summaryrefslogtreecommitdiffstats
path: root/.gitignore
diff options
context:
space:
mode:
authorAlan Stern2009-09-01 17:38:34 +0200
committerLive-CD User2009-09-19 22:13:39 +0200
commit41bd34ddd7aa46dbc03b5bb33896e0fa8100fe7b (patch)
treeadfd9b5af7a68cfa053f1c3f8192578d612ca18e /.gitignore
parenttty: Char: mxser, use THRE for ASPP_OQUEUE ioctl (diff)
downloadkernel-qcow2-linux-41bd34ddd7aa46dbc03b5bb33896e0fa8100fe7b.tar.gz
kernel-qcow2-linux-41bd34ddd7aa46dbc03b5bb33896e0fa8100fe7b.tar.xz
kernel-qcow2-linux-41bd34ddd7aa46dbc03b5bb33896e0fa8100fe7b.zip
usb-serial: change referencing of port and serial structures
This patch (as1284) changes the referencing of the usb_serial and usb_serial_port structures in usb-serial.c. It's not feasible to make the port structures keep a reference to the serial structure, because the ports need to remain in existence when serial is released -- quite a few of the drivers expect this. Consequently taking a reference to the port when the device file is open is insufficient; such a reference would not pin serial. To fix this, we now take a reference to serial when the device file is opened. The final put_device() for the ports occurs in destroy_serial(), so that the ports will last as long as they are needed. The patch initializes all the port devices, including those in the unused "fake" ports. This makes the code more uniform because they can all be released in the same way. The error handling code in usb_serial_probe() is much simplified by this approach; instead of freeing everything by hand we can use a single usb_serial_put() call. Also simplified is the port-release mechanism. Instead of being two separate routines, port_release() and port_free() can be combined into one. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to '.gitignore')
0 files changed, 0 insertions, 0 deletions