[Linux-parport] [patch 3/4] paride: replace schedule_timeout() with
msleep()
janitor at sternwelten.at
janitor at sternwelten.at
Thu Sep 2 11:33:47 EDT 2004
I would appreciate any comments from the janitor at sternweltens list. This is one (of
many) cases where I made a decision about replacing
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(some_time);
with
msleep(jiffies_to_msecs(some_time));
msleep() is not exactly the same as the previous code, but I only did
this replacement where I thought long delays were *desired*. If this is
not the case here, then just disregard this patch.
Thanks,
Nish
Description: Uses msleep() instead of schedule_timeout() to guarantee
the task delays at least the desired time amount.
Signed-off-by: Nishanth Aravamudan <nacc at us.ibm.com>
Signed-off-by: Maximilian Attems <janitor at sternwelten.at>
---
linux-2.6.9-rc1-bk7-max/drivers/block/paride/pg.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
diff -puN drivers/block/paride/pg.c~msleep-drivers_block_paride_pg drivers/block/paride/pg.c
--- linux-2.6.9-rc1-bk7/drivers/block/paride/pg.c~msleep-drivers_block_paride_pg 2004-09-01 19:34:39.000000000 +0200
+++ linux-2.6.9-rc1-bk7-max/drivers/block/paride/pg.c 2004-09-01 19:34:39.000000000 +0200
@@ -409,7 +409,7 @@ static int pg_reset(struct pg *dev)
write_reg(dev, 6, DRIVE(dev));
write_reg(dev, 7, 8);
- pg_sleep(20 * HZ / 1000);
+ msleep(20);
k = 0;
while ((k++ < PG_RESET_TMO) && (status_reg(dev) & STAT_BUSY))
_
More information about the Linux-parport
mailing list