[Linux-parport] [patch 1/4] parport/ieee1284_ops: replace schedule_timeout() with msleep_interruptible()

domen at coderock.org domen at coderock.org
Mon Jun 20 17:54:50 EDT 2005


From: Nishanth Aravamudan <nacc at us.ibm.com>



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>
---
 ieee1284_ops.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

Index: quilt/drivers/parport/ieee1284_ops.c
===================================================================
--- quilt.orig/drivers/parport/ieee1284_ops.c
+++ quilt/drivers/parport/ieee1284_ops.c
@@ -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