[patch 14/14] mtd/cfi_cmdset_0001: replace schedule_timeout() with msleep()

From: janitor
Date: Wed Sep 01 2004 - 18:59:02 EST








I would appreciate any comments from the janitor@sternweltens list.

Thanks,
Nish



Description: Uses msleep() instead of schedule_timeout() so the task
is guaranteed to delay the desired time.

Signed-off-by: Nishanth Aravamudan <nacc@xxxxxxxxxx>
Signed-off-by: Maximilian Attems <janitor@xxxxxxxxxxxxxx>



---

linux-2.6.9-rc1-bk7-max/drivers/mtd/chips/cfi_cmdset_0001.c | 3 +--
1 files changed, 1 insertion(+), 2 deletions(-)

diff -puN drivers/mtd/chips/cfi_cmdset_0001.c~msleep-drivers_mtd_chips_cfi_cmdset_0001 drivers/mtd/chips/cfi_cmdset_0001.c
--- linux-2.6.9-rc1-bk7/drivers/mtd/chips/cfi_cmdset_0001.c~msleep-drivers_mtd_chips_cfi_cmdset_0001 2004-09-01 19:35:25.000000000 +0200
+++ linux-2.6.9-rc1-bk7-max/drivers/mtd/chips/cfi_cmdset_0001.c 2004-09-01 19:35:25.000000000 +0200
@@ -1437,8 +1437,7 @@ static int do_erase_oneblock(struct map_

spin_unlock(chip->mutex);
INVALIDATE_CACHED_RANGE(map, adr, len);
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout((chip->erase_time*HZ)/(2*1000));
+ msleep(chip->erase_time / 2);
spin_lock(chip->mutex);

/* FIXME. Use a timer to check this, and return immediately. */

_
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/