linux/include
Alan Stern 765e0ba626 usb-serial: new API for driver registration
This patch (as1522) adds two new routines to the usb-serial core, for
registering and unregistering serial drivers.  Instead of registering
the usb_driver and usb_serial_drivers separately, with error checking
for each one, the drivers can all be registered and unregistered by a
single function call.  This reduces duplicated code.

More importantly, the new core routines change the order in which the
drivers are registered.  Currently the usb-serial drivers are all
registered first and the usb_driver is done last, which leaves a
window for problems.  A udev script may quickly add a new dynamic-ID
for a usb-serial driver, causing the corresponding usb_driver to be
probed.  If the usb_driver hasn't been registered yet then an oops
will occur.

The new routine prevents such problems by registering the usb_driver
first.  To insure that it gets probed properly for already-attached
serial devices, we call driver_attach() after all the usb-serial
drivers have been registered.

Along with adding the new routines, the patch modifies the "generic"
serial driver to use them.  Further patches will similarly modify all
the other in-tree USB serial drivers.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24 12:39:17 -08:00
..
acpi Merge branches 'atomicio-apei', 'hotplug', 'sony-nvs-nosave' and 'thermal-netlink' into release 2012-01-23 19:47:06 -05:00
asm-generic asm-generic: architecture independent readq/writeq for 32bit environment 2012-02-21 16:47:28 -08:00
crypto
drm drm: Fix authentication kernel crash 2012-01-25 09:27:45 +00:00
keys keys: add a "logon" key type 2012-01-17 22:39:40 -06:00
linux usb-serial: new API for driver registration 2012-02-24 12:39:17 -08:00
math-emu
media Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2012-01-18 12:53:54 -08:00
misc
mtd mtd: document that MEMWRITE ioctl is NAND-specific 2012-01-09 18:18:36 +00:00
net netprio_cgroup: fix wrong memory access when NETPRIO_CGROUP=m 2012-02-10 15:08:57 -05:00
pcmcia
rdma
rxrpc
scsi SCSI & usb-storage: add flags for VPD pages and REPORT LUNS 2012-02-08 17:36:41 -08:00
sound Merge branch 'fix/asoc' into for-linus 2012-01-31 15:13:14 +01:00
target target: Change target_submit_cmd() to return void 2012-02-07 06:41:04 +00:00
trace writeback: fix dereferencing NULL bdi->dev on trace_writeback_queue 2012-02-06 11:17:25 +08:00
video fbdev fixes for 3.3 2012-02-07 15:54:02 -08:00
xen Merge branch 'for-3.3/drivers' of git://git.kernel.dk/linux-block 2012-01-15 12:48:41 -08:00
Kbuild