]> git.baikalelectronics.ru Git - kernel.git/commit
Char: nozomi, remove port.count checks
authorJiri Slaby <jslaby@suse.cz>
Wed, 20 Apr 2011 08:43:13 +0000 (10:43 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 25 Apr 2011 21:19:10 +0000 (14:19 -0700)
commit023f0fedbad5bec049e62f80888a683865ec98fe
treeddfad773d1a748fa860572364b7cd361d8429041
parentb3b3c5489b7a0d7e1a1c83eec960451920aa4b81
Char: nozomi, remove port.count checks

Before b5ba76c9, these were some kind of protection against race with
HUP. They were protected with port->tty_sem at the same time.

By that commit, the counting was switched to tty_port's one, but the
locking remained the old one. So the count was not protected by
any lock anymore.

The driver should not test whether it raced with HUP or not anyways.
With the new refcounted tty model, it just should proceed as nothing
happened because all needed info is still there. In respect to this,
let's drop the useless and unprotected tests (tty_port->count is
protected by tty_port->lock).

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Tested-by: Gerald Pfeifer <gerald@pfeifer.com>
Cc: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/tty/nozomi.c