mtd/cfi_cmdset_0001: replace schedule_timeout() with msleep()
PATCH 14/14 mtd/cfi_cmdset_0001: replace schedule_timeout() with msleep()
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(-)
drivers/mtd/chips/cfi_cmdset_0001.c renamed from drivers/mtd/chips/cfi_cmdset_0001.c~msleep-drivers_mtd_chips_cfi_cmdset_0001 +1 -2
@@ -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. */
_