Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Nishanth Aravamudan and committed by
Linus Torvalds
3c76bc5b a9a3047d

+3 -6
+3 -6
drivers/serial/crisv10.c
··· 4416 4416 info->event = 0; 4417 4417 info->tty = 0; 4418 4418 if (info->blocked_open) { 4419 - if (info->close_delay) { 4420 - set_current_state(TASK_INTERRUPTIBLE); 4421 - schedule_timeout(info->close_delay); 4422 - } 4419 + if (info->close_delay) 4420 + schedule_timeout_interruptible(info->close_delay); 4423 4421 wake_up_interruptible(&info->open_wait); 4424 4422 } 4425 4423 info->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CLOSING); ··· 4467 4469 while (info->xmit.head != info->xmit.tail || /* More in send queue */ 4468 4470 (*info->ostatusadr & 0x007f) || /* more in FIFO */ 4469 4471 (elapsed_usec < 2*info->char_time_usec)) { 4470 - set_current_state(TASK_INTERRUPTIBLE); 4471 - schedule_timeout(1); 4472 + schedule_timeout_interruptible(1); 4472 4473 if (signal_pending(current)) 4473 4474 break; 4474 4475 if (timeout && time_after(jiffies, orig_jiffies + timeout))