Driver Core: usb: add nodename support for usb drivers.
This adds support for USB drivers to report their requested nodename to userspace. It also updates a number of USB drivers to provide the needed subdirectory and device name to be used for them. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Jan Blunck <jblunck@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
d405640539
commit
f7a386c5b8
@ -869,6 +869,8 @@ struct usb_driver {
|
||||
* struct usb_device_driver - identifies USB device driver to usbcore
|
||||
* @name: The driver name should be unique among USB drivers,
|
||||
* and should normally be the same as the module name.
|
||||
* @nodename: Callback to provide a naming hint for a possible
|
||||
* device node to create.
|
||||
* @probe: Called to see if the driver is willing to manage a particular
|
||||
* device. If it is, probe returns zero and uses dev_set_drvdata()
|
||||
* to associate driver-specific data with the device. If unwilling
|
||||
@ -912,6 +914,7 @@ extern struct bus_type usb_bus_type;
|
||||
*/
|
||||
struct usb_class_driver {
|
||||
char *name;
|
||||
char *(*nodename)(struct device *dev);
|
||||
const struct file_operations *fops;
|
||||
int minor_base;
|
||||
};
|
||||
|
Reference in New Issue
Block a user