]> git.baikalelectronics.ru Git - kernel.git/commit
usb_serial: Fix remaining ref count/lock bugs
authorAlan Cox <alan@lxorguk.ukuu.org.uk>
Mon, 27 Jul 2009 23:34:58 +0000 (00:34 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 28 Jul 2009 00:26:23 +0000 (17:26 -0700)
commit471c45934f37c43b159a07858c54dcf912358ff5
treecc80d5acf9abe433573efe5d610b0f19df04f5d8
parentebad0235547e2a4a0413ce3dcbdc2b245304d112
usb_serial: Fix remaining ref count/lock bugs

This fixes
- locking bug that was hidden by aa17700534500e3f2933d9f6cb683e9e27906343
- Regression #13821
- Spurious warning when closing and blocking for data write out

With these changes my PL2303 always ends up as ttyUSB0 when it should and
the module refcounts stay correct.

I'll do a more wholesale split & tidy of _open in the next release or two
as we get a standard tty_port_open and port->ops->init port->ops->shutdown
call backs.

Copy sent to Alan Stern and Carlos Mafra just to confirm it fixes all the
reports but it passes local testing with the same hardware as Alan Stern.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/usb/serial/usb-serial.c