aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/tty_ldisc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/tty/tty_ldisc.c b/drivers/tty/tty_ldisc.c
index 534d176a78ed..a69a755035b6 100644
--- a/drivers/tty/tty_ldisc.c
+++ b/drivers/tty/tty_ldisc.c
@@ -763,8 +763,6 @@ static int tty_ldisc_reinit(struct tty_struct *tty, int ldisc)
763 if (IS_ERR(ld)) 763 if (IS_ERR(ld))
764 return -1; 764 return -1;
765 765
766 WARN_ON_ONCE(tty_ldisc_wait_idle(tty, 5 * HZ));
767
768 tty_ldisc_close(tty, tty->ldisc); 766 tty_ldisc_close(tty, tty->ldisc);
769 tty_ldisc_put(tty->ldisc); 767 tty_ldisc_put(tty->ldisc);
770 tty->ldisc = NULL; 768 tty->ldisc = NULL;
@@ -848,6 +846,8 @@ void tty_ldisc_hangup(struct tty_struct *tty)
848 it means auditing a lot of other paths so this is 846 it means auditing a lot of other paths so this is
849 a FIXME */ 847 a FIXME */
850 if (tty->ldisc) { /* Not yet closed */ 848 if (tty->ldisc) { /* Not yet closed */
849 WARN_ON_ONCE(tty_ldisc_wait_idle(tty, 5 * HZ));
850
851 if (reset == 0) { 851 if (reset == 0) {
852 852
853 if (!tty_ldisc_reinit(tty, tty->termios->c_line)) 853 if (!tty_ldisc_reinit(tty, tty->termios->c_line))