kernel-ark/drivers/usb/serial
Alan Stern 41bd34ddd7 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>
2009-09-19 13:13:39 -07:00
..
aircable.c USB: usb-serial: replace shutdown with disconnect, release 2009-06-15 21:44:47 -07:00
ark3116.c tty: USB serial termios bits 2009-09-19 13:13:33 -07:00
belkin_sa.c tty: USB does not need the filp argument in the drivers 2009-09-19 13:13:26 -07:00
belkin_sa.h
bus.c USB: usb-serial: call port_probe and port_remove at the right times 2009-06-15 21:44:47 -07:00
ch341.c tty: USB does not need the filp argument in the drivers 2009-09-19 13:13:26 -07:00
ChangeLog.history trivial: Fix misspelling of firmware 2009-03-30 15:21:59 +02:00
console.c tty: USB does not need the filp argument in the drivers 2009-09-19 13:13:26 -07:00
cp210x.c tty: USB does not need the filp argument in the drivers 2009-09-19 13:13:26 -07:00
cyberjack.c tty: USB does not need the filp argument in the drivers 2009-09-19 13:13:26 -07:00
cypress_m8.c tty: USB serial termios bits 2009-09-19 13:13:33 -07:00
cypress_m8.h
digi_acceleport.c tty: USB does not need the filp argument in the drivers 2009-09-19 13:13:26 -07:00
empeg.c tty: USB serial termios bits 2009-09-19 13:13:33 -07:00
ezusb_convert.pl
ezusb.c
ftdi_sio.c tty: USB does not need the filp argument in the drivers 2009-09-19 13:13:26 -07:00
ftdi_sio.h USB: ftdi_sio: add product_id for Marvell OpenRD Base, Client 2009-08-07 16:05:13 -07:00
funsoft.c
garmin_gps.c tty: USB does not need the filp argument in the drivers 2009-09-19 13:13:26 -07:00
generic.c tty: USB does not need the filp argument in the drivers 2009-09-19 13:13:26 -07:00
hp4x.c
io_16654.h
io_edgeport.c tty: USB does not need the filp argument in the drivers 2009-09-19 13:13:26 -07:00
io_edgeport.h
io_ionsp.h
io_tables.h USB: usb-serial: replace shutdown with disconnect, release 2009-06-15 21:44:47 -07:00
io_ti.c tty: USB does not need the filp argument in the drivers 2009-09-19 13:13:26 -07:00
io_ti.h
io_usbvend.h
ipaq.c tty: USB does not need the filp argument in the drivers 2009-09-19 13:13:26 -07:00
ipaq.h
ipw.c tty: USB does not need the filp argument in the drivers 2009-09-19 13:13:26 -07:00
ir-usb.c tty: USB does not need the filp argument in the drivers 2009-09-19 13:13:26 -07:00
iuu_phoenix.c tty: USB serial termios bits 2009-09-19 13:13:33 -07:00
iuu_phoenix.h
Kconfig trivial: fix typos/grammar errors in Kconfig texts 2009-03-30 15:22:01 +02:00
keyspan_pda.c tty: USB does not need the filp argument in the drivers 2009-09-19 13:13:26 -07:00
keyspan_usa26msg.h
keyspan_usa28msg.h
keyspan_usa49msg.h
keyspan_usa67msg.h
keyspan_usa90msg.h
keyspan.c tty: USB does not need the filp argument in the drivers 2009-09-19 13:13:26 -07:00
keyspan.h tty: USB does not need the filp argument in the drivers 2009-09-19 13:13:26 -07:00
kl5kusb105.c tty: USB does not need the filp argument in the drivers 2009-09-19 13:13:26 -07:00
kl5kusb105.h
kobil_sct.c tty: USB serial termios bits 2009-09-19 13:13:33 -07:00
kobil_sct.h
Makefile USB: serial: rename cp2101 driver to cp210x 2009-03-24 16:20:44 -07:00
Makefile-keyspan_pda_fw
mct_u232.c tty: USB: serial/mct_u232, fix tty refcnt 2009-09-19 13:13:37 -07:00
mct_u232.h
mos7720.c tty: USB does not need the filp argument in the drivers 2009-09-19 13:13:26 -07:00
mos7840.c tty: USB does not need the filp argument in the drivers 2009-09-19 13:13:26 -07:00
moto_modem.c USB device codes for Motorola phone. 2009-04-17 10:50:26 -07:00
navman.c tty: USB does not need the filp argument in the drivers 2009-09-19 13:13:26 -07:00
omninet.c tty: USB does not need the filp argument in the drivers 2009-09-19 13:13:26 -07:00
opticon.c tty: USB does not need the filp argument in the drivers 2009-09-19 13:13:26 -07:00
option.c tty: USB does not need the filp argument in the drivers 2009-09-19 13:13:26 -07:00
oti6858.c tty: USB serial termios bits 2009-09-19 13:13:33 -07:00
oti6858.h
pl2303.c tty: USB does not need the filp argument in the drivers 2009-09-19 13:13:26 -07:00
pl2303.h USB: pl2303: New vendor and product id 2009-08-07 16:05:12 -07:00
qcserial.c USB: qcserial: Add extra device IDs 2009-04-17 10:50:24 -07:00
safe_serial.c
siemens_mpi.c
sierra.c tty: USB does not need the filp argument in the drivers 2009-09-19 13:13:26 -07:00
spcp8x5.c tty: USB serial termios bits 2009-09-19 13:13:33 -07:00
symbolserial.c tty: USB does not need the filp argument in the drivers 2009-09-19 13:13:26 -07:00
ti_usb_3410_5052.c tty: USB does not need the filp argument in the drivers 2009-09-19 13:13:26 -07:00
ti_usb_3410_5052.h
usb_debug.c tty: USB does not need the filp argument in the drivers 2009-09-19 13:13:26 -07:00
usb-serial.c usb-serial: change referencing of port and serial structures 2009-09-19 13:13:39 -07:00
visor.c tty: USB does not need the filp argument in the drivers 2009-09-19 13:13:26 -07:00
visor.h
whiteheat.c tty: USB serial termios bits 2009-09-19 13:13:33 -07:00
whiteheat.h