summaryrefslogtreecommitdiff
path: root/drivers/char
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2009-10-13 21:20:35 +0200
committerThomas Gleixner <tglx@linutronix.de>2009-10-13 21:20:35 +0200
commit795ee62f0dd24d6a4c163dbd6caffaf648193447 (patch)
tree6b6855a1694d4da295373683c7e39e69eaac521e /drivers/char
parentc2171f666fbd581bb18ed0b5d7a5270a4c931364 (diff)
parent5eee394f24eca7d1f670ddc9d08a8d02c90e74ca (diff)
downloadlwn-795ee62f0dd24d6a4c163dbd6caffaf648193447.tar.gz
lwn-795ee62f0dd24d6a4c163dbd6caffaf648193447.zip
Merge 2.6.31.4
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.31.y into rt/2.6.31 Conflicts: Makefile Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/tty_ldisc.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/char/tty_ldisc.c b/drivers/char/tty_ldisc.c
index c8f7b70ab6cc..c90dcc1b9a80 100644
--- a/drivers/char/tty_ldisc.c
+++ b/drivers/char/tty_ldisc.c
@@ -516,7 +516,7 @@ static void tty_ldisc_restore(struct tty_struct *tty, struct tty_ldisc *old)
static int tty_ldisc_halt(struct tty_struct *tty)
{
clear_bit(TTY_LDISC, &tty->flags);
- return cancel_delayed_work(&tty->buf.work);
+ return cancel_delayed_work_sync(&tty->buf.work);
}
/**
@@ -754,12 +754,9 @@ void tty_ldisc_hangup(struct tty_struct *tty)
* N_TTY.
*/
if (tty->driver->flags & TTY_DRIVER_RESET_TERMIOS) {
- /* Make sure the old ldisc is quiescent */
- tty_ldisc_halt(tty);
- flush_scheduled_work();
-
/* Avoid racing set_ldisc or tty_ldisc_release */
mutex_lock(&tty->ldisc_mutex);
+ tty_ldisc_halt(tty);
if (tty->ldisc) { /* Not yet closed */
/* Switch back to N_TTY */
tty_ldisc_reinit(tty);