Jiri Slaby 49a5f3cf6a TTY: pdc_cons, fix regression in close
The test in pdc_console_tty_close '!tty->count' was always wrong
because tty->count is decremented after tty->ops->close is called and
thus can never be zero. Hence the 'then' branch was never executed and
the timer never deleted.

This did not matter until commit 5dd5bc40f3b6 ("TTY: pdc_cons, use
tty_port").  There we needed to set TTY in tty_port to NULL, but this
never happened due to the bug above.

So change the test to really trigger at the last close by changing the
condition to 'tty->count == 1'.

Well, the driver should not touch tty->count at all.  It should use
tty_port->count and count open count there itself.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Reported-and-tested-by: Mikulas Patocka <mpatocka@redhat.com>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Helge Deller <deller@gmx.de>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-05-05 16:21:21 -07:00
..
2012-03-28 18:30:02 +01:00
2008-03-15 19:12:19 -07:00
2009-01-05 19:18:27 +00:00
2011-03-31 11:26:23 -03:00
2005-04-16 15:20:36 -07:00
2011-07-26 16:49:47 -07:00
2012-03-28 15:58:21 -07:00
2010-10-16 22:43:08 +02:00
2012-03-28 18:30:02 +01:00
2008-10-10 16:32:28 +00:00
2011-03-31 11:26:23 -03:00
2012-03-31 13:32:30 -07:00
2005-04-16 15:20:36 -07:00
2011-03-31 11:26:23 -03:00
2012-03-28 18:30:02 +01:00