aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/n_tty.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty/n_tty.c')
-rw-r--r--drivers/tty/n_tty.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c
index d2b496750d59..4ddfa60c9222 100644
--- a/drivers/tty/n_tty.c
+++ b/drivers/tty/n_tty.c
@@ -2399,17 +2399,12 @@ static unsigned int n_tty_poll(struct tty_struct *tty, struct file *file,
2399 2399
2400 poll_wait(file, &tty->read_wait, wait); 2400 poll_wait(file, &tty->read_wait, wait);
2401 poll_wait(file, &tty->write_wait, wait); 2401 poll_wait(file, &tty->write_wait, wait);
2402 if (test_bit(TTY_OTHER_CLOSED, &tty->flags))
2403 mask |= POLLHUP;
2404 if (input_available_p(tty, 1)) 2402 if (input_available_p(tty, 1))
2405 mask |= POLLIN | POLLRDNORM; 2403 mask |= POLLIN | POLLRDNORM;
2406 else if (mask & POLLHUP) {
2407 tty_flush_to_ldisc(tty);
2408 if (input_available_p(tty, 1))
2409 mask |= POLLIN | POLLRDNORM;
2410 }
2411 if (tty->packet && tty->link->ctrl_status) 2404 if (tty->packet && tty->link->ctrl_status)
2412 mask |= POLLPRI | POLLIN | POLLRDNORM; 2405 mask |= POLLPRI | POLLIN | POLLRDNORM;
2406 if (test_bit(TTY_OTHER_CLOSED, &tty->flags))
2407 mask |= POLLHUP;
2413 if (tty_hung_up_p(file)) 2408 if (tty_hung_up_p(file))
2414 mask |= POLLHUP; 2409 mask |= POLLHUP;
2415 if (!(mask & (POLLHUP | POLLIN | POLLRDNORM))) { 2410 if (!(mask & (POLLHUP | POLLIN | POLLRDNORM))) {