[PATCH] drivers/char: fix-up schedule_timeout() usage
Use schedule_timeout_interruptible() instead of set_current_state()/schedule_timeout() to reduce kernel size. 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
2ddee1b7a7
commit
da4cd8dfe1
@@ -655,8 +655,7 @@ i2QueueCommands(int type, i2ChanStrPtr pCh, int timeout, int nCommands,
|
||||
timeout--; // So negative values == forever
|
||||
|
||||
if (!in_interrupt()) {
|
||||
current->state = TASK_INTERRUPTIBLE;
|
||||
schedule_timeout(1); // short nap
|
||||
schedule_timeout_interruptible(1); // short nap
|
||||
} else {
|
||||
// we cannot sched/sleep in interrrupt silly
|
||||
return 0;
|
||||
@@ -1132,8 +1131,7 @@ i2Output(i2ChanStrPtr pCh, const char *pSource, int count, int user )
|
||||
|
||||
ip2trace (CHANN, ITRC_OUTPUT, 61, 0 );
|
||||
|
||||
current->state = TASK_INTERRUPTIBLE;
|
||||
schedule_timeout(2);
|
||||
schedule_timeout_interruptible(2);
|
||||
if (signal_pending(current)) {
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user