diff options
author | Nishanth Aravamudan <nacc@us.ibm.com> | 2005-09-12 14:15:34 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-09-12 14:15:34 -0700 |
commit | 121caf577dc61588c1128821873a08cec48baf58 (patch) | |
tree | 751e2e6bf9b58aa4b40e8285d357b0cf083ae8cc /net/irda/ircomm | |
parent | 7672d0b54411371e0b6a831c1cb2f0ce615de6dc (diff) | |
download | blackbird-op-linux-121caf577dc61588c1128821873a08cec48baf58.tar.gz blackbird-op-linux-121caf577dc61588c1128821873a08cec48baf58.zip |
[NET]: fix-up schedule_timeout() usage
Use schedule_timeout_{,un}interruptible() instead of
set_current_state()/schedule_timeout() to reduce kernel size. Also use
human-time conversion functions instead of hard-coded division to avoid
rounding issues.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/irda/ircomm')
-rw-r--r-- | net/irda/ircomm/ircomm_tty.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/net/irda/ircomm/ircomm_tty.c b/net/irda/ircomm/ircomm_tty.c index 5d1e61168eb7..6f20b4206e08 100644 --- a/net/irda/ircomm/ircomm_tty.c +++ b/net/irda/ircomm/ircomm_tty.c @@ -567,10 +567,8 @@ static void ircomm_tty_close(struct tty_struct *tty, struct file *filp) self->tty = NULL; if (self->blocked_open) { - if (self->close_delay) { - current->state = TASK_INTERRUPTIBLE; - schedule_timeout(self->close_delay); - } + if (self->close_delay) + schedule_timeout_interruptible(self->close_delay); wake_up_interruptible(&self->open_wait); } @@ -863,8 +861,7 @@ static void ircomm_tty_wait_until_sent(struct tty_struct *tty, int timeout) spin_lock_irqsave(&self->spinlock, flags); while (self->tx_skb && self->tx_skb->len) { spin_unlock_irqrestore(&self->spinlock, flags); - current->state = TASK_INTERRUPTIBLE; - schedule_timeout(poll_time); + schedule_timeout_interruptible(poll_time); spin_lock_irqsave(&self->spinlock, flags); if (signal_pending(current)) break; |