diff options
Diffstat (limited to 'drivers/sbus')
-rw-r--r-- | drivers/sbus/char/aurora.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/sbus/char/aurora.c b/drivers/sbus/char/aurora.c index 650d5e924f47..d96cc47de566 100644 --- a/drivers/sbus/char/aurora.c +++ b/drivers/sbus/char/aurora.c | |||
@@ -1515,8 +1515,7 @@ static void aurora_close(struct tty_struct * tty, struct file * filp) | |||
1515 | */ | 1515 | */ |
1516 | timeout = jiffies+HZ; | 1516 | timeout = jiffies+HZ; |
1517 | while(port->SRER & SRER_TXEMPTY) { | 1517 | while(port->SRER & SRER_TXEMPTY) { |
1518 | current->state = TASK_INTERRUPTIBLE; | 1518 | msleep_interruptible(jiffies_to_msecs(port->timeout)); |
1519 | schedule_timeout(port->timeout); | ||
1520 | if (time_after(jiffies, timeout)) | 1519 | if (time_after(jiffies, timeout)) |
1521 | break; | 1520 | break; |
1522 | } | 1521 | } |
@@ -1533,8 +1532,7 @@ static void aurora_close(struct tty_struct * tty, struct file * filp) | |||
1533 | port->tty = 0; | 1532 | port->tty = 0; |
1534 | if (port->blocked_open) { | 1533 | if (port->blocked_open) { |
1535 | if (port->close_delay) { | 1534 | if (port->close_delay) { |
1536 | current->state = TASK_INTERRUPTIBLE; | 1535 | msleep_interruptible(jiffies_to_msecs(port->close_delay)); |
1537 | schedule_timeout(port->close_delay); | ||
1538 | } | 1536 | } |
1539 | wake_up_interruptible(&port->open_wait); | 1537 | wake_up_interruptible(&port->open_wait); |
1540 | } | 1538 | } |