diff options
Diffstat (limited to 'drivers/char/tty_io.c')
| -rw-r--r-- | drivers/char/tty_io.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index cc4b43bad703..6e4be3bb2d89 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c | |||
| @@ -94,6 +94,7 @@ | |||
| 94 | #include <linux/idr.h> | 94 | #include <linux/idr.h> |
| 95 | #include <linux/wait.h> | 95 | #include <linux/wait.h> |
| 96 | #include <linux/bitops.h> | 96 | #include <linux/bitops.h> |
| 97 | #include <linux/delay.h> | ||
| 97 | 98 | ||
| 98 | #include <asm/uaccess.h> | 99 | #include <asm/uaccess.h> |
| 99 | #include <asm/system.h> | 100 | #include <asm/system.h> |
| @@ -2180,12 +2181,11 @@ static int tiocsetd(struct tty_struct *tty, int __user *p) | |||
| 2180 | return tty_set_ldisc(tty, ldisc); | 2181 | return tty_set_ldisc(tty, ldisc); |
| 2181 | } | 2182 | } |
| 2182 | 2183 | ||
| 2183 | static int send_break(struct tty_struct *tty, int duration) | 2184 | static int send_break(struct tty_struct *tty, unsigned int duration) |
| 2184 | { | 2185 | { |
| 2185 | tty->driver->break_ctl(tty, -1); | 2186 | tty->driver->break_ctl(tty, -1); |
| 2186 | if (!signal_pending(current)) { | 2187 | if (!signal_pending(current)) { |
| 2187 | set_current_state(TASK_INTERRUPTIBLE); | 2188 | msleep_interruptible(duration); |
| 2188 | schedule_timeout(duration); | ||
| 2189 | } | 2189 | } |
| 2190 | tty->driver->break_ctl(tty, 0); | 2190 | tty->driver->break_ctl(tty, 0); |
| 2191 | if (signal_pending(current)) | 2191 | if (signal_pending(current)) |
| @@ -2366,10 +2366,10 @@ int tty_ioctl(struct inode * inode, struct file * file, | |||
| 2366 | * all by anyone? | 2366 | * all by anyone? |
| 2367 | */ | 2367 | */ |
| 2368 | if (!arg) | 2368 | if (!arg) |
| 2369 | return send_break(tty, HZ/4); | 2369 | return send_break(tty, 250); |
| 2370 | return 0; | 2370 | return 0; |
| 2371 | case TCSBRKP: /* support for POSIX tcsendbreak() */ | 2371 | case TCSBRKP: /* support for POSIX tcsendbreak() */ |
| 2372 | return send_break(tty, arg ? arg*(HZ/10) : HZ/4); | 2372 | return send_break(tty, arg ? arg*100 : 250); |
| 2373 | 2373 | ||
| 2374 | case TIOCMGET: | 2374 | case TIOCMGET: |
| 2375 | return tty_tiocmget(tty, file, p); | 2375 | return tty_tiocmget(tty, file, p); |
