Commit 70c83375 authored by Nishanth Aravamudan's avatar Nishanth Aravamudan Committed by David S. Miller

[SPARC]: sbus/aurora: replace schedule_timeout() with msleep_interruptible()

Use msleep_interruptible() instead of
schedule_timeout() to guarantee the task delays as expected.
Signed-off-by: default avatarNishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: default avatarMaximilian Attems <janitor@sternwelten.at>
Signed-off-by: default avatarDomen Puncer <domen@coderock.org>
parent 4564203d
...@@ -1515,8 +1515,7 @@ static void aurora_close(struct tty_struct * tty, struct file * filp) ...@@ -1515,8 +1515,7 @@ static void aurora_close(struct tty_struct * tty, struct file * filp)
*/ */
timeout = jiffies+HZ; timeout = jiffies+HZ;
while(port->SRER & SRER_TXEMPTY) { while(port->SRER & SRER_TXEMPTY) {
current->state = TASK_INTERRUPTIBLE; msleep_interruptible(jiffies_to_msecs(port->timeout));
schedule_timeout(port->timeout);
if (time_after(jiffies, timeout)) if (time_after(jiffies, timeout))
break; break;
} }
...@@ -1533,8 +1532,7 @@ static void aurora_close(struct tty_struct * tty, struct file * filp) ...@@ -1533,8 +1532,7 @@ static void aurora_close(struct tty_struct * tty, struct file * filp)
port->tty = 0; port->tty = 0;
if (port->blocked_open) { if (port->blocked_open) {
if (port->close_delay) { if (port->close_delay) {
current->state = TASK_INTERRUPTIBLE; msleep_interruptible(jiffies_to_msecs(port->close_delay));
schedule_timeout(port->close_delay);
} }
wake_up_interruptible(&port->open_wait); wake_up_interruptible(&port->open_wait);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment