public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] Char: nozomi, fix tty->count counting
@ 2010-07-29  9:09 Jiri Slaby
  2010-07-29  9:13 ` Jiri Slaby
  2010-07-29  9:46 ` [PATCH 1/1] Char: nozomi, set tty->driver_data appropriately Jiri Slaby
  0 siblings, 2 replies; 3+ messages in thread
From: Jiri Slaby @ 2010-07-29  9:09 UTC (permalink / raw)
  To: gregkh; +Cc: jirislaby, linux-kernel, Jiri Slaby, Alan Cox

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>
---
 drivers/char/nozomi.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/char/nozomi.c b/drivers/char/nozomi.c
index d578449..7f9b858 100644
--- a/drivers/char/nozomi.c
+++ b/drivers/char/nozomi.c
@@ -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;
-- 
1.7.2



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-07-29  9:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-29  9:09 [PATCH 1/1] Char: nozomi, fix tty->count counting Jiri Slaby
2010-07-29  9:13 ` Jiri Slaby
2010-07-29  9:46 ` [PATCH 1/1] Char: nozomi, set tty->driver_data appropriately Jiri Slaby

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox