diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index 524703a7df2b175d33241eada47bc852641748bc..71a9409c8d7ee50859e4faa0f06ff8ba38f4e663 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c @@ -1387,9 +1387,10 @@ void tty_init_termios(struct tty_struct *tty) else { /* Check for lazy saved data */ tp = tty->driver->termios[idx]; - if (tp != NULL) + if (tp != NULL) { tty->termios = *tp; - else + tty->termios.c_line = tty->driver->init_termios.c_line; + } else tty->termios = tty->driver->init_termios; } /* Compatibility until drivers always set this */ diff --git a/drivers/tty/tty_ldisc.c b/drivers/tty/tty_ldisc.c index 713cc2d48846b05be255be258eb238a0c7aea449..b2e8210639ddc4b9fa0f9ad926311274a10f916c 100644 --- a/drivers/tty/tty_ldisc.c +++ b/drivers/tty/tty_ldisc.c @@ -743,9 +743,6 @@ static void tty_ldisc_kill(struct tty_struct *tty) tty_ldisc_put(tty->ldisc); /* Force an oops if we mess this up */ tty->ldisc = NULL; - - /* Ensure the next open requests the N_TTY ldisc */ - tty_set_termios_ldisc(tty, N_TTY); } /**