USB: Make it possible to "subclass" usb_device_driver
authorBastien Nocera <hadess@hadess.net>
Wed, 16 Oct 2019 09:39:29 +0000 (11:39 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 12 Feb 2020 19:01:54 +0000 (11:01 -0800)
commitc9d503370f240934f3c1c5da4c6c2452a7d05db2
tree92803ca7729f1ef26bc69542c96ee29850fd1815
parentef0f7d1877ac21fd926f2349e6a025c201651cf7
USB: Make it possible to "subclass" usb_device_driver

The kernel currenly has only 2 usb_device_drivers, one generic one, one
that completely replaces the generic one to make USB devices usable over
a network.

Use the newly exported generic driver functions when a driver declares
to want them run, in addition to its own code. This makes it possible to
write drivers that extend the generic USB driver.

Note that this patch is not enough for another driver to automatically
get selected.

Signed-off-by: Bastien Nocera <hadess@hadess.net>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Link: https://lore.kernel.org/r/20191016093933.693-3-hadess@hadess.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/driver.c
include/linux/usb.h