diff options
author | Nishanth Aravamudan <nacc@us.ibm.com> | 2005-09-10 03:27:30 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-10 13:06:38 -0400 |
commit | da4cd8dfe18ee901b880f94ca0fa79d5cc1cd0eb (patch) | |
tree | 7f135b3c3d9450e3b489cd39af6085e338013613 /drivers/char/ip2 | |
parent | 2ddee1b7a732dc96d479afaa7d0a26aa53990089 (diff) |
[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>
Diffstat (limited to 'drivers/char/ip2')
-rw-r--r-- | drivers/char/ip2/i2lib.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/char/ip2/i2lib.c b/drivers/char/ip2/i2lib.c index 82c5f30375ac..ba85eb1b6ec7 100644 --- a/drivers/char/ip2/i2lib.c +++ b/drivers/char/ip2/i2lib.c | |||
@@ -655,8 +655,7 @@ i2QueueCommands(int type, i2ChanStrPtr pCh, int timeout, int nCommands, | |||
655 | timeout--; // So negative values == forever | 655 | timeout--; // So negative values == forever |
656 | 656 | ||
657 | if (!in_interrupt()) { | 657 | if (!in_interrupt()) { |
658 | current->state = TASK_INTERRUPTIBLE; | 658 | schedule_timeout_interruptible(1); // short nap |
659 | schedule_timeout(1); // short nap | ||
660 | } else { | 659 | } else { |
661 | // we cannot sched/sleep in interrrupt silly | 660 | // we cannot sched/sleep in interrrupt silly |
662 | return 0; | 661 | return 0; |
@@ -1132,8 +1131,7 @@ i2Output(i2ChanStrPtr pCh, const char *pSource, int count, int user ) | |||
1132 | 1131 | ||
1133 | ip2trace (CHANN, ITRC_OUTPUT, 61, 0 ); | 1132 | ip2trace (CHANN, ITRC_OUTPUT, 61, 0 ); |
1134 | 1133 | ||
1135 | current->state = TASK_INTERRUPTIBLE; | 1134 | schedule_timeout_interruptible(2); |
1136 | schedule_timeout(2); | ||
1137 | if (signal_pending(current)) { | 1135 | if (signal_pending(current)) { |
1138 | break; | 1136 | break; |
1139 | } | 1137 | } |