diff options
author | Nishanth Aravamudan <nacc@us.ibm.com> | 2005-11-07 04:01:21 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-07 10:53:59 -0500 |
commit | 3c76bc5bfda308aa42d5f42fde8dc1931e45e8a6 (patch) | |
tree | 2fd0ff833d85e68d50676cb74d3aef9be4f74ccf /drivers/serial | |
parent | a9a3047dd8ae43ff24caae5ec733a93df129568e (diff) |
[PATCH] serial: fix-up schedule_timeout() usage
Use schedule_timeout_uninterruptible() instead of
set_current_state()/schedule_timeout() to reduce kernel size.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/serial')
-rw-r--r-- | drivers/serial/crisv10.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/serial/crisv10.c b/drivers/serial/crisv10.c index 40d3e7139cfe..08c42c000188 100644 --- a/drivers/serial/crisv10.c +++ b/drivers/serial/crisv10.c | |||
@@ -4416,10 +4416,8 @@ rs_close(struct tty_struct *tty, struct file * filp) | |||
4416 | info->event = 0; | 4416 | info->event = 0; |
4417 | info->tty = 0; | 4417 | info->tty = 0; |
4418 | if (info->blocked_open) { | 4418 | if (info->blocked_open) { |
4419 | if (info->close_delay) { | 4419 | if (info->close_delay) |
4420 | set_current_state(TASK_INTERRUPTIBLE); | 4420 | schedule_timeout_interruptible(info->close_delay); |
4421 | schedule_timeout(info->close_delay); | ||
4422 | } | ||
4423 | wake_up_interruptible(&info->open_wait); | 4421 | wake_up_interruptible(&info->open_wait); |
4424 | } | 4422 | } |
4425 | info->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CLOSING); | 4423 | info->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CLOSING); |
@@ -4469,8 +4467,7 @@ static void rs_wait_until_sent(struct tty_struct *tty, int timeout) | |||
4469 | while (info->xmit.head != info->xmit.tail || /* More in send queue */ | 4467 | while (info->xmit.head != info->xmit.tail || /* More in send queue */ |
4470 | (*info->ostatusadr & 0x007f) || /* more in FIFO */ | 4468 | (*info->ostatusadr & 0x007f) || /* more in FIFO */ |
4471 | (elapsed_usec < 2*info->char_time_usec)) { | 4469 | (elapsed_usec < 2*info->char_time_usec)) { |
4472 | set_current_state(TASK_INTERRUPTIBLE); | 4470 | schedule_timeout_interruptible(1); |
4473 | schedule_timeout(1); | ||
4474 | if (signal_pending(current)) | 4471 | if (signal_pending(current)) |
4475 | break; | 4472 | break; |
4476 | if (timeout && time_after(jiffies, orig_jiffies + timeout)) | 4473 | if (timeout && time_after(jiffies, orig_jiffies + timeout)) |