mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
[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 <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
7672d0b544
commit
121caf577d
4 changed files with 11 additions and 20 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue