tty: Don't reenable already enabled ldisc
authorPeter Hurley <peter@hurleysoftware.com>
Mon, 11 Mar 2013 20:44:33 +0000 (16:44 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 18 Mar 2013 23:44:02 +0000 (16:44 -0700)
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>
drivers/tty/tty_io.c
drivers/tty/tty_ldisc.c
include/linux/tty.h

index d3ddb31e363e1181594e5ce0d768537a6ae7e5ee..e6ee0f459a200bc8e0643b8df18001cf6ba70a29 100644 (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);
 
index 37671fcc7e4c0a747a0d6e58051e1dc6794b54ca..9c727da59fac7f9e274d202adffce640855cdd18 100644 (file)
@@ -373,7 +373,7 @@ static inline void tty_ldisc_put(struct tty_ldisc *ld)
  *     Clearing directly is allowed.
  */
 
-void tty_ldisc_enable(struct tty_struct *tty)
+static void tty_ldisc_enable(struct tty_struct *tty)
 {
        clear_bit(TTY_LDISC_HALTED, &tty->flags);
        set_bit(TTY_LDISC, &tty->flags);
index 66ae020e8a980e2ba8ad0f9c6307e847920ba41c..367a9dfc4ea2464c35ffe8c773c5cb8f04e3df86 100644 (file)
@@ -561,8 +561,6 @@ extern void tty_ldisc_release(struct tty_struct *tty, struct tty_struct *o_tty);
 extern void tty_ldisc_init(struct tty_struct *tty);
 extern void tty_ldisc_deinit(struct tty_struct *tty);
 extern void tty_ldisc_begin(void);
-/* This last one is just for the tty layer internals and shouldn't be used elsewhere */
-extern void tty_ldisc_enable(struct tty_struct *tty);
 
 
 /* n_tty.c */
This page took 0.028975 seconds and 5 git commands to generate.