From: Nishanth Aravamudan Use msleep_interruptible() instead of schedule_timeout() to guarantee the task delays as expected. Signed-off-by: Nishanth Aravamudan Signed-off-by: Andrew Morton --- 25-akpm/drivers/macintosh/macserial.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff -puN drivers/macintosh/macserial.c~macintosh-macserial-replaceschedule_timeout-with-msleep_interruptible drivers/macintosh/macserial.c --- 25/drivers/macintosh/macserial.c~macintosh-macserial-replaceschedule_timeout-with-msleep_interruptible 2004-09-20 10:38:36.897382712 -0700 +++ 25-akpm/drivers/macintosh/macserial.c 2004-09-20 10:38:36.903381800 -0700 @@ -2002,8 +2002,7 @@ static void rs_close(struct tty_struct * 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); } @@ -2048,8 +2047,7 @@ static void rs_wait_until_sent(struct tt if (timeout) char_time = min_t(unsigned long, char_time, timeout); while ((read_zsreg(info->zs_channel, 1) & ALL_SNT) == 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)) _