[Linux-parport] [patch 3/3] parport/ieee1284_ops: replace
schedule_timeout() with msleep_interruptible()
janitor at sternwelten.at
janitor at sternwelten.at
Sat Oct 30 19:37:15 EDT 2004
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>
---
linux-2.6.10-rc1-max/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
--- linux-2.6.10-rc1/drivers/parport/ieee1284_ops.c~msleep_interruptible-drivers_parport_ieee1284_ops 2004-10-24 17:05:18.000000000 +0200
+++ linux-2.6.10-rc1-max/drivers/parport/ieee1284_ops.c 2004-10-24 17:05:18.000000000 +0200
@@ -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