]> git.baikalelectronics.ru Git - kernel.git/commit
tty: Reset c_line from driver's init_termios
authorPeter Hurley <peter@hurleysoftware.com>
Mon, 11 Jan 2016 06:40:57 +0000 (22:40 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Jan 2016 23:01:44 +0000 (15:01 -0800)
commitb5da3672b44a0bcd3c6a77422da6cece0538d1be
treec5078f6e4067c27b2f68595a2dcbe2575fc655b8
parentb5dcc33ce93fc130f2fec75d9d8af7a7b93e8018
tty: Reset c_line from driver's init_termios

After the ldisc is released, but before the tty is destroyed, the termios
is saved (in tty_free_termios()); this termios is restored if a new
tty is created on next open(). However, the line discipline is always
reset, which is not obvious in the current method. Instead, reset
as part of the restore.

Restore the original line discipline, which may not have been N_TTY.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/tty_io.c
drivers/tty/tty_ldisc.c