diff options
Diffstat (limited to 'drivers/tty/n_tty.c')
-rw-r--r-- | drivers/tty/n_tty.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c index 20932cc9c8f7..b09023b07169 100644 --- a/drivers/tty/n_tty.c +++ b/drivers/tty/n_tty.c | |||
@@ -343,8 +343,7 @@ static void n_tty_packet_mode_flush(struct tty_struct *tty) | |||
343 | spin_lock_irqsave(&tty->ctrl_lock, flags); | 343 | spin_lock_irqsave(&tty->ctrl_lock, flags); |
344 | tty->ctrl_status |= TIOCPKT_FLUSHREAD; | 344 | tty->ctrl_status |= TIOCPKT_FLUSHREAD; |
345 | spin_unlock_irqrestore(&tty->ctrl_lock, flags); | 345 | spin_unlock_irqrestore(&tty->ctrl_lock, flags); |
346 | if (waitqueue_active(&tty->link->read_wait)) | 346 | wake_up_interruptible(&tty->link->read_wait); |
347 | wake_up_interruptible(&tty->link->read_wait); | ||
348 | } | 347 | } |
349 | } | 348 | } |
350 | 349 | ||
@@ -1382,8 +1381,7 @@ handle_newline: | |||
1382 | put_tty_queue(c, ldata); | 1381 | put_tty_queue(c, ldata); |
1383 | smp_store_release(&ldata->canon_head, ldata->read_head); | 1382 | smp_store_release(&ldata->canon_head, ldata->read_head); |
1384 | kill_fasync(&tty->fasync, SIGIO, POLL_IN); | 1383 | kill_fasync(&tty->fasync, SIGIO, POLL_IN); |
1385 | if (waitqueue_active(&tty->read_wait)) | 1384 | wake_up_interruptible_poll(&tty->read_wait, POLLIN); |
1386 | wake_up_interruptible_poll(&tty->read_wait, POLLIN); | ||
1387 | return 0; | 1385 | return 0; |
1388 | } | 1386 | } |
1389 | } | 1387 | } |
@@ -1667,8 +1665,7 @@ static void __receive_buf(struct tty_struct *tty, const unsigned char *cp, | |||
1667 | 1665 | ||
1668 | if ((read_cnt(ldata) >= ldata->minimum_to_wake) || L_EXTPROC(tty)) { | 1666 | if ((read_cnt(ldata) >= ldata->minimum_to_wake) || L_EXTPROC(tty)) { |
1669 | kill_fasync(&tty->fasync, SIGIO, POLL_IN); | 1667 | kill_fasync(&tty->fasync, SIGIO, POLL_IN); |
1670 | if (waitqueue_active(&tty->read_wait)) | 1668 | wake_up_interruptible_poll(&tty->read_wait, POLLIN); |
1671 | wake_up_interruptible_poll(&tty->read_wait, POLLIN); | ||
1672 | } | 1669 | } |
1673 | } | 1670 | } |
1674 | 1671 | ||
@@ -1887,10 +1884,8 @@ static void n_tty_set_termios(struct tty_struct *tty, struct ktermios *old) | |||
1887 | } | 1884 | } |
1888 | 1885 | ||
1889 | /* The termios change make the tty ready for I/O */ | 1886 | /* The termios change make the tty ready for I/O */ |
1890 | if (waitqueue_active(&tty->write_wait)) | 1887 | wake_up_interruptible(&tty->write_wait); |
1891 | wake_up_interruptible(&tty->write_wait); | 1888 | wake_up_interruptible(&tty->read_wait); |
1892 | if (waitqueue_active(&tty->read_wait)) | ||
1893 | wake_up_interruptible(&tty->read_wait); | ||
1894 | } | 1889 | } |
1895 | 1890 | ||
1896 | /** | 1891 | /** |