Skip to contentSkip to conversation

mtd/cfi_cmdset_0001: replace schedule_timeout() with msleep()

PATCH In review [email protected] 1 participant 1 message Sep 1, 2004 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

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.

---

 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
diff -puN drivers/mtd/chips/cfi_cmdset_0001.c~msleep-drivers_mtd_chips_cfi_cmdset_0001 drivers/mtd/chips/cfi_cmdset_0001.c
@@ -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. */

_