aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorPierre Ossman <drzeus@drzeus.cx>2006-10-22 16:13:10 -0400
committerPierre Ossman <drzeus@drzeus.cx>2006-12-01 12:27:23 -0500
commit73778120c4088a0a7b59c4c378904f7a230b4820 (patch)
tree8b5bf199e7af815695013dea46901c948e84cbad /drivers/mmc
parente45a1bd20fa5b920901879e85cdf5eda21f78d7c (diff)
mmc: Fix mmc_delay() function
Several fixes for mmc_delay(): * Repair if-clause that was supposed to detect sub-hz delays. * Change yield() to cond_resched() as yield() no longer has the semantics we desire. * mmc_delay() is used to guarantee protocol delays, so we cannot return early (i.e. use _interruptable). Based on patch by Amol Lad. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/mmc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 1593a6a632cf..82b7643c1654 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -454,11 +454,11 @@ static void mmc_deselect_cards(struct mmc_host *host)
454 454
455static inline void mmc_delay(unsigned int ms) 455static inline void mmc_delay(unsigned int ms)
456{ 456{
457 if (ms < HZ / 1000) { 457 if (ms < 1000 / HZ) {
458 yield(); 458 cond_resched();
459 mdelay(ms); 459 mdelay(ms);
460 } else { 460 } else {
461 msleep_interruptible (ms); 461 msleep(ms);
462 } 462 }
463} 463}
464 464