summaryrefslogtreecommitdiffstats
path: root/drivers/serial/68360serial.c
diff options
context:
space:
mode:
authorNishanth Aravamudan <nacc@us.ibm.com>2005-06-25 14:59:32 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-25 16:25:10 -0700
commit5d582b4ef6df853ca2da46135855cd6536c0205b (patch)
tree4e1a42e132967f5aab8c26a11810e6b06a95fb92 /drivers/serial/68360serial.c
parentf353488ce48e7a0311fe764284096481b455fbe9 (diff)
downloadlinux-stable-5d582b4ef6df853ca2da46135855cd6536c0205b.tar.gz
linux-stable-5d582b4ef6df853ca2da46135855cd6536c0205b.tar.bz2
linux-stable-5d582b4ef6df853ca2da46135855cd6536c0205b.zip
[PATCH] serial/68360serial: replace schedule_timeout() with msleep_interruptible()
Use msleep_interruptible() instead of schedule_timeout() in send_break() to guarantee the task delays as expected. Change @duration's units to milliseconds, and modify arguments in callers appropriately. Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com> 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/serial/68360serial.c')
-rw-r--r--drivers/serial/68360serial.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/serial/68360serial.c b/drivers/serial/68360serial.c
index f148022b6b4e..b116122e569a 100644
--- a/drivers/serial/68360serial.c
+++ b/drivers/serial/68360serial.c
@@ -1394,14 +1394,13 @@ static void end_break(ser_info_t *info)
/*
* This routine sends a break character out the serial port.
*/
-static void send_break(ser_info_t *info, int duration)
+static void send_break(ser_info_t *info, unsigned int duration)
{
- set_current_state(TASK_INTERRUPTIBLE);
#ifdef SERIAL_DEBUG_SEND_BREAK
printk("rs_send_break(%d) jiff=%lu...", duration, jiffies);
#endif
begin_break(info);
- schedule_timeout(duration);
+ msleep_interruptible(duration);
end_break(info);
#ifdef SERIAL_DEBUG_SEND_BREAK
printk("done jiffies=%lu\n", jiffies);
@@ -1436,7 +1435,7 @@ static int rs_360_ioctl(struct tty_struct *tty, struct file * file,
if (signal_pending(current))
return -EINTR;
if (!arg) {
- send_break(info, HZ/4); /* 1/4 second */
+ send_break(info, 250); /* 1/4 second */
if (signal_pending(current))
return -EINTR;
}
@@ -1448,7 +1447,7 @@ static int rs_360_ioctl(struct tty_struct *tty, struct file * file,
tty_wait_until_sent(tty, 0);
if (signal_pending(current))
return -EINTR;
- send_break(info, arg ? arg*(HZ/10) : HZ/4);
+ send_break(info, arg ? arg*100 : 250);
if (signal_pending(current))
return -EINTR;
return 0;