summaryrefslogtreecommitdiff
path: root/drivers/tc
diff options
context:
space:
mode:
authorDomen Puncer <domen@coderock.org>2005-03-13 00:56:28 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-03-13 00:56:28 -0800
commitdcd2db4efd406a3a90fd80f7ac57d21b06c0766e (patch)
tree61b7d6c2a26e61e36a5600c8d25ec9ec19528554 /drivers/tc
parent64c3ae43c78ad9713c9d9dc6605f954df2d3cbe0 (diff)
[PATCH] tc/zs: replace schedule_timeout() with msleep_interruptible()
Use msleep_interruptible() instead of schedule_timeout() to guarantee the task delays as expected. Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com> Signed-off-by: Maximilian Attems <janitor@sternwelten.at> Signed-off-by: Domen Puncer <domen@coderock.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/tc')
-rw-r--r--drivers/tc/zs.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/tc/zs.c b/drivers/tc/zs.c
index d838585e3780..4382ee60b6a8 100644
--- a/drivers/tc/zs.c
+++ b/drivers/tc/zs.c
@@ -1364,8 +1364,7 @@ static void rs_close(struct tty_struct *tty, struct file * filp)
info->tty = 0;
if (info->blocked_open) {
if (info->close_delay) {
- current->state = TASK_INTERRUPTIBLE;
- schedule_timeout(info->close_delay);
+ msleep_interruptible(jiffies_to_msecs(info->close_delay));
}
wake_up_interruptible(&info->open_wait);
}
@@ -1399,8 +1398,7 @@ static void rs_wait_until_sent(struct tty_struct *tty, int timeout)
if (timeout)
char_time = min(char_time, timeout);
while ((read_zsreg(info->zs_channel, 1) & Tx_BUF_EMP) == 0) {
- current->state = TASK_INTERRUPTIBLE;
- schedule_timeout(char_time);
+ msleep_interruptible(jiffies_to_msecs(char_time));
if (signal_pending(current))
break;
if (timeout && time_after(jiffies, orig_jiffies + timeout))