[Linux-parport] [patch 1/3] parport/ieee1284_ops: replace
schedule_timeout() with msleep_interruptible()
domen at coderock.org
domen at coderock.org
Tue Jan 11 18:24:10 EST 2005
Any comments would be appreciated.
Description: Use msleep_interruptible() instead of schedule_timeout() to
guarantee the task delays as expected.
Signed-off-by: Nishanth Aravamudan <nacc at us.ibm.com>
Signed-off-by: Maximilian Attems <janitor at sternwelten.at>
Signed-off-by: Domen Puncer <domen at coderock.org>
---
kj-domen/drivers/parport/ieee1284_ops.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff -puN drivers/parport/ieee1284_ops.c~msleep_interruptible-drivers_parport_ieee1284_ops drivers/parport/ieee1284_ops.c
--- kj/drivers/parport/ieee1284_ops.c~msleep_interruptible-drivers_parport_ieee1284_ops 2005-01-10 18:00:09.000000000 +0100
+++ kj-domen/drivers/parport/ieee1284_ops.c 2005-01-10 18:00:09.000000000 +0100
@@ -97,8 +97,7 @@ size_t parport_ieee1284_write_compat (st
our interrupt handler called. */
if (count && no_irq) {
parport_release (dev);
- __set_current_state (TASK_INTERRUPTIBLE);
- schedule_timeout (wait);
+ msleep_interruptible(jiffies_to_msecs(wait));
parport_claim_or_block (dev);
}
else
@@ -542,8 +541,7 @@ size_t parport_ieee1284_ecp_read_data (s
/* Yield the port for a while. */
if (count && dev->port->irq != PARPORT_IRQ_NONE) {
parport_release (dev);
- __set_current_state (TASK_INTERRUPTIBLE);
- schedule_timeout ((HZ + 24) / 25);
+ msleep_interruptible(40);
parport_claim_or_block (dev);
}
else
_
More information about the Linux-parport
mailing list