2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-22 12:14:01 +08:00
linux-next/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 belkin_sa: clean up code 2008-07-22 13:03:22 -07:00
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 cypress_m8: coding style 2008-07-22 13:03:23 -07:00
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 USB: remove use of err() in drivers/usb/serial 2008-10-17 14:41:10 -07:00
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 funsoft: Switch to linux/uaccess 2008-07-22 13:03:23 -07:00
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 USB: remove info() macro from usb/serial drivers 2008-10-17 14:41:09 -07:00
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 USB: add iuu_phoenix driver 2008-02-01 14:34:47 -08:00
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 USB: mct232: speed, new termios and compliance cleanups 2008-02-01 14:34:56 -08:00
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 USB: remove use of err() in drivers/usb/serial 2008-10-17 14:41:10 -07:00
siemens_mpi.c USB: add siemens_mpi usb-serial "stub" driver 2009-01-07 10:00:13 -08:00
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: two more usb ids for ti_usb_3410_5052 2009-02-09 11:19:48 -08:00
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 whiteheat: coding style 2008-07-22 13:03:22 -07:00