tty: Don't reenable already enabled ldisc

tty_ldisc_hangup() guarantees the ldisc is enabled (or that there
is no ldisc). Since __tty_hangup() was the only user, re-define
tty_ldisc_enable() in file-scope.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Peter Hurley
2013-03-11 16:44:33 -04:00
committed by Greg Kroah-Hartman
parent b66f4fa509
commit d912156605
3 changed files with 1 additions and 4 deletions

View File

@@ -693,7 +693,6 @@ static void __tty_hangup(struct tty_struct *tty, int exit_session)
*/
set_bit(TTY_HUPPED, &tty->flags);
clear_bit(TTY_HUPPING, &tty->flags);
tty_ldisc_enable(tty);
tty_unlock(tty);