summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorPeter Hurley <peter@hurleysoftware.com>2013-03-11 16:44:33 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-03-18 16:44:02 -0700
commitd912156605b0eb3b3070dc7eabc43db6379aa43b (patch)
treeac7fb32024a2e11ae94ee14401c652fc427ff2b2 /drivers
parentb66f4fa509153ca9d313075806d5c6425dfa43c5 (diff)
downloadlinux-3.10-d912156605b0eb3b3070dc7eabc43db6379aa43b.tar.gz
linux-3.10-d912156605b0eb3b3070dc7eabc43db6379aa43b.tar.bz2
linux-3.10-d912156605b0eb3b3070dc7eabc43db6379aa43b.zip
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/tty/tty_io.c1
-rw-r--r--drivers/tty/tty_ldisc.c2
2 files changed, 1 insertions, 2 deletions
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index d3ddb31e363..e6ee0f459a2 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -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);
diff --git a/drivers/tty/tty_ldisc.c b/drivers/tty/tty_ldisc.c
index 37671fcc7e4..9c727da59fa 100644
--- a/drivers/tty/tty_ldisc.c
+++ b/drivers/tty/tty_ldisc.c
@@ -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);