From 7b4ccf8db4c1dc343ad5d6ed19240bbc3b5f945f Mon Sep 17 00:00:00 2001 From: Nishanth Aravamudan Date: Sat, 10 Sep 2005 00:27:31 -0700 Subject: [PATCH] parport: fix-up schedule_timeout() usage Use schedule_timeout_interruptible() instead of set_current_state()/schedule_timeout() to reduce kernel size. Also use human-time to jiffies units conversion functions rather than direct HZ division to avoid rounding issues. Signed-off-by: Nishanth Aravamudan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/parport/parport_pc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/parport/parport_pc.c') diff --git a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c index 1b938bb9be3..c6493ad7c0c 100644 --- a/drivers/parport/parport_pc.c +++ b/drivers/parport/parport_pc.c @@ -173,8 +173,7 @@ static int change_mode(struct parport *p, int m) if (time_after_eq (jiffies, expire)) /* The FIFO is stuck. */ return -EBUSY; - __set_current_state (TASK_INTERRUPTIBLE); - schedule_timeout ((HZ + 99) / 100); + schedule_timeout_interruptible(msecs_to_jiffies(10)); if (signal_pending (current)) break; } -- cgit v1.2.3