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 <[email protected]>
Signed-off-by: Maximilian Attems <[email protected]>
---
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. */
_