]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/2.6.34.4/char-nozomi-fix-tty-count-counting.patch
drop queue-4.14/mips-make-sure-dt-memory-regions-are-valid.patch
[thirdparty/kernel/stable-queue.git] / releases / 2.6.34.4 / char-nozomi-fix-tty-count-counting.patch
CommitLineData
ac0dd8b4
GKH
1From ee78bb95b7bea08b7774a02073ea2bb45611a9e1 Mon Sep 17 00:00:00 2001
2From: Jiri Slaby <jslaby@suse.cz>
3Date: Thu, 29 Jul 2010 11:09:47 +0200
4Subject: Char: nozomi, fix tty->count counting
5
6From: Jiri Slaby <jslaby@suse.cz>
7
8commit ee78bb95b7bea08b7774a02073ea2bb45611a9e1 upstream.
9
10Currently ntty_install omits to increment tty count and we get the
11following warnings:
12Warning: dev (noz2) tty->count(0) != #fd's(1) in tty_open
13
14So to fix that, add one tty->count++ there.
15
16Signed-off-by: Jiri Slaby <jslaby@suse.cz>
17Cc: Alan Cox <alan@linux.intel.com>
18Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
19
20---
21 drivers/char/nozomi.c | 1 +
22 1 file changed, 1 insertion(+)
23
24--- a/drivers/char/nozomi.c
25+++ b/drivers/char/nozomi.c
26@@ -1611,6 +1611,7 @@ static int ntty_install(struct tty_drive
27 ret = tty_init_termios(tty);
28 if (ret == 0) {
29 tty_driver_kref_get(driver);
30+ tty->count++;
31 driver->ttys[tty->index] = tty;
32 }
33 return ret;