summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2010-01-04 16:26:50 +0000
committerGreg Kroah-Hartman <gregkh@suse.de>2010-04-01 15:55:35 -0700
commitf321f60bd07c223fb240bad680ba519fda82873c (patch)
tree63ced3735eb37d2d86616ef9a2342ad90d8c3026 /drivers
parent12761d772b9d9bdccfb7610538e90de2be15a3f7 (diff)
nozomi: quick fix for the close/close bug
commit eeec32a731631a9bad9abb21c626b9f2840bee0d upstream. Nozomi goes wrong if you get the sequence open open close [stuff] close which turns out to occur on some ppp type setups. This is a quick patch up for the problem. It's not really fixing Nozomi which completely fails to implement tty open/close semantics and all the other needed stuff. Doing it right is a rather more invasive patch set and not one that will backport. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/nozomi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/nozomi.c b/drivers/char/nozomi.c
index ec58d8c387ff..2171e9dac1ab 100644
--- a/drivers/char/nozomi.c
+++ b/drivers/char/nozomi.c
@@ -1628,10 +1628,10 @@ static void ntty_close(struct tty_struct *tty, struct file *file)
dc->open_ttys--;
port->count--;
- tty_port_tty_set(port, NULL);
if (port->count == 0) {
DBG1("close: %d", nport->token_dl);
+ tty_port_tty_set(port, NULL);
spin_lock_irqsave(&dc->spin_mutex, flags);
dc->last_ier &= ~(nport->token_dl);
writew(dc->last_ier, dc->reg_ier);