]> git.baikalelectronics.ru Git - kernel.git/commit
tty: moxa: split open lock
authorAlan Cox <alan@linux.intel.com>
Mon, 30 Nov 2009 13:18:24 +0000 (13:18 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 11 Dec 2009 23:18:08 +0000 (15:18 -0800)
commit73b6d7b303a34a83ad062c9d9399923b79db8032
treeb87fe3662714c89f38cddd6b7fafc4b60e8b2642
parentbc68cfc98b800cc40bc048d6e89b1e1ecf900008
tty: moxa: split open lock

moxa_openlock is used for several situations where we want to handle the
case of an ioctl that crosses many ports (not just the open tty), and also
cases where an open races a deinit (eg a pci unplug) and we hangup a port
before we can cope with that.

The non open race cases can use the moxa_lock spinlock. This simplifies sorting
out the remaining mess.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/char/moxa.c