提交 70c83375 编写于 作者: N Nishanth Aravamudan 提交者: 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: NNishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: NMaximilian Attems <janitor@sternwelten.at>
Signed-off-by: NDomen Puncer <domen@coderock.org>
上级 4564203d
......@@ -1515,8 +1515,7 @@ static void aurora_close(struct tty_struct * tty, struct file * filp)
*/
timeout = jiffies+HZ;
while(port->SRER & SRER_TXEMPTY) {
current->state = TASK_INTERRUPTIBLE;
schedule_timeout(port->timeout);
msleep_interruptible(jiffies_to_msecs(port->timeout));
if (time_after(jiffies, timeout))
break;
}
......@@ -1533,8 +1532,7 @@ static void aurora_close(struct tty_struct * tty, struct file * filp)
port->tty = 0;
if (port->blocked_open) {
if (port->close_delay) {
current->state = TASK_INTERRUPTIBLE;
schedule_timeout(port->close_delay);
msleep_interruptible(jiffies_to_msecs(port->close_delay));
}
wake_up_interruptible(&port->open_wait);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册