]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
Char: nozomi, fix tty->count counting
authorJiri Slaby <jslaby@suse.cz>
Thu, 29 Jul 2010 09:09:47 +0000 (11:09 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 10 Aug 2010 20:47:46 +0000 (13:47 -0700)
Currently ntty_install omits to increment tty count and we get the
following warnings:
Warning: dev (noz2) tty->count(0) != #fd's(1) in tty_open

So to fix that, add one tty->count++ there.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Alan Cox <alan@linux.intel.com>
Cc: stable <stable@kernel.org> [.34, .35]
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/char/nozomi.c

index a6638003f530ff55688231f2acf09b3e12262b05..21ae1b158b3b551b27bea0ec3e2f467a9011f0e6 100644 (file)
@@ -1611,6 +1611,7 @@ static int ntty_install(struct tty_driver *driver, struct tty_struct *tty)
        ret = tty_init_termios(tty);
        if (ret == 0) {
                tty_driver_kref_get(driver);
+               tty->count++;
                driver->ttys[tty->index] = tty;
        }
        return ret;