Parcourir la source

[SCSI] megaraid: replace yield() with cond_resched()

For this driver cond_resched() seems to be a better alternative

Signed-off-by: Amol Lad <amol@verismonetworks.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Amol Lad il y a 18 ans
Parent
commit
e1fa0ceaf3
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  1. 2 1
      drivers/scsi/megaraid.c

+ 2 - 1
drivers/scsi/megaraid.c

@@ -1754,7 +1754,8 @@ __mega_busywait_mbox (adapter_t *adapter)
 	for (counter = 0; counter < 10000; counter++) {
 		if (!mbox->m_in.busy)
 			return 0;
-		udelay(100); yield();
+		udelay(100);
+		cond_resched();
 	}
 	return -1;		/* give up after 1 second */
 }