[Linux-parport] [patch 1/3] parport/parport_pc: replace schedule_timeout() with msleep_interruptible()

janitor at sternwelten.at janitor at sternwelten.at
Sat Oct 30 19:37:09 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/parport_pc.c |    3 +--
 1 files changed, 1 insertion(+), 2 deletions(-)

diff -puN drivers/parport/parport_pc.c~msleep_interruptible-drivers_parport_parport_pc drivers/parport/parport_pc.c
--- linux-2.6.10-rc1/drivers/parport/parport_pc.c~msleep_interruptible-drivers_parport_parport_pc	2004-10-24 17:05:20.000000000 +0200
+++ linux-2.6.10-rc1-max/drivers/parport/parport_pc.c	2004-10-24 17:05:20.000000000 +0200
@@ -168,8 +168,7 @@ static int change_mode(struct parport *p
 				if (time_after_eq (jiffies, expire))
 					/* The FIFO is stuck. */
 					return -EBUSY;
-				__set_current_state (TASK_INTERRUPTIBLE);
-				schedule_timeout ((HZ + 99) / 100);
+				msleep_interruptible(10);
 				if (signal_pending (current))
 					break;
 			}
_



More information about the Linux-parport mailing list