diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-11-09 22:42:04 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-11-09 22:42:04 -0500 |
commit | 394e849b83463869e2267ea7acea002366e6fefc (patch) | |
tree | 917ec5c564964d781ffbda2917efdf7cde252c72 /drivers/tty/n_tty.c | |
parent | 98267d33e2da8cd386212856a22f4a64b32834ab (diff) | |
parent | 206c5f60a3d902bc4b56dab2de3e88de5eb06108 (diff) |
Merge 3.18-rc4 into tty-next.
This resolves a merge issue with drivers/tty/serial/8250/8250_mtk.c
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/n_tty.c')
-rw-r--r-- | drivers/tty/n_tty.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c index 112eda7c56bc..8358daa865e5 100644 --- a/drivers/tty/n_tty.c +++ b/drivers/tty/n_tty.c | |||
@@ -2406,12 +2406,17 @@ static unsigned int n_tty_poll(struct tty_struct *tty, struct file *file, | |||
2406 | 2406 | ||
2407 | poll_wait(file, &tty->read_wait, wait); | 2407 | poll_wait(file, &tty->read_wait, wait); |
2408 | poll_wait(file, &tty->write_wait, wait); | 2408 | poll_wait(file, &tty->write_wait, wait); |
2409 | if (test_bit(TTY_OTHER_CLOSED, &tty->flags)) | ||
2410 | mask |= POLLHUP; | ||
2409 | if (input_available_p(tty, 1)) | 2411 | if (input_available_p(tty, 1)) |
2410 | mask |= POLLIN | POLLRDNORM; | 2412 | mask |= POLLIN | POLLRDNORM; |
2413 | else if (mask & POLLHUP) { | ||
2414 | tty_flush_to_ldisc(tty); | ||
2415 | if (input_available_p(tty, 1)) | ||
2416 | mask |= POLLIN | POLLRDNORM; | ||
2417 | } | ||
2411 | if (tty->packet && tty->link->ctrl_status) | 2418 | if (tty->packet && tty->link->ctrl_status) |
2412 | mask |= POLLPRI | POLLIN | POLLRDNORM; | 2419 | mask |= POLLPRI | POLLIN | POLLRDNORM; |
2413 | if (test_bit(TTY_OTHER_CLOSED, &tty->flags)) | ||
2414 | mask |= POLLHUP; | ||
2415 | if (tty_hung_up_p(file)) | 2420 | if (tty_hung_up_p(file)) |
2416 | mask |= POLLHUP; | 2421 | mask |= POLLHUP; |
2417 | if (!(mask & (POLLHUP | POLLIN | POLLRDNORM))) { | 2422 | if (!(mask & (POLLHUP | POLLIN | POLLRDNORM))) { |