[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 <nacc@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:

committed by
Linus Torvalds

parent
da4cd8dfe1
commit
7b4ccf8db4
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user