nozomi: quick fix for the close/close bug

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>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by Alan Cox and committed by Greg Kroah-Hartman eeec32a7 3f001711

+1 -1
+1 -1
drivers/char/nozomi.c
··· 1651 1651 1652 1652 dc->open_ttys--; 1653 1653 port->count--; 1654 - tty_port_tty_set(port, NULL); 1655 1654 1656 1655 if (port->count == 0) { 1657 1656 DBG1("close: %d", nport->token_dl); 1657 + tty_port_tty_set(port, NULL); 1658 1658 spin_lock_irqsave(&dc->spin_mutex, flags); 1659 1659 dc->last_ier &= ~(nport->token_dl); 1660 1660 writew(dc->last_ier, dc->reg_ier);