summaryrefslogtreecommitdiffstats
path: root/drivers/char/mxser.c
diff options
context:
space:
mode:
authorNishanth Aravamudan <nacc@us.ibm.com>2005-09-10 00:27:30 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-10 10:06:38 -0700
commitda4cd8dfe18ee901b880f94ca0fa79d5cc1cd0eb (patch)
tree7f135b3c3d9450e3b489cd39af6085e338013613 /drivers/char/mxser.c
parent2ddee1b7a732dc96d479afaa7d0a26aa53990089 (diff)
downloadop-kernel-dev-da4cd8dfe18ee901b880f94ca0fa79d5cc1cd0eb.zip
op-kernel-dev-da4cd8dfe18ee901b880f94ca0fa79d5cc1cd0eb.tar.gz
[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/mxser.c')
-rw-r--r--drivers/char/mxser.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c
index d0ef1ae..45d012d 100644
--- a/drivers/char/mxser.c
+++ b/drivers/char/mxser.c
@@ -1058,8 +1058,7 @@ static void mxser_close(struct tty_struct *tty, struct file *filp)
*/
timeout = jiffies + HZ;
while (!(inb(info->base + UART_LSR) & UART_LSR_TEMT)) {
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(5);
+ schedule_timeout_interruptible(5);
if (time_after(jiffies, timeout))
break;
}
@@ -1080,10 +1079,8 @@ static void mxser_close(struct tty_struct *tty, struct file *filp)
info->event = 0;
info->tty = NULL;
if (info->blocked_open) {
- if (info->close_delay) {
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(info->close_delay);
- }
+ if (info->close_delay)
+ schedule_timeout_interruptible(info->close_delay);
wake_up_interruptible(&info->open_wait);
}
@@ -1801,8 +1798,7 @@ static void mxser_wait_until_sent(struct tty_struct *tty, int timeout)
#ifdef SERIAL_DEBUG_RS_WAIT_UNTIL_SENT
printk("lsr = %d (jiff=%lu)...", lsr, jiffies);
#endif
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(char_time);
+ schedule_timeout_interruptible(char_time);
if (signal_pending(current))
break;
if (timeout && time_after(jiffies, orig_jiffies + timeout))
OpenPOWER on IntegriCloud