aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb.h
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2009-04-30 09:23:42 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-06-16 00:30:25 -0400
commitf7a386c5b8ff34cd84ae922603d1c6f9d234edee (patch)
treeae1c03544dd511d85cc537c632eba6f035072e36 /include/linux/usb.h
parentd405640539555b601e52f7d18f1f0b1345d18bf5 (diff)
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>
Diffstat (limited to 'include/linux/usb.h')
-rw-r--r--include/linux/usb.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h
index 3aa2cd1f8d08..34cdfcac4555 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -869,6 +869,8 @@ struct usb_driver {
869 * struct usb_device_driver - identifies USB device driver to usbcore 869 * struct usb_device_driver - identifies USB device driver to usbcore
870 * @name: The driver name should be unique among USB drivers, 870 * @name: The driver name should be unique among USB drivers,
871 * and should normally be the same as the module name. 871 * and should normally be the same as the module name.
872 * @nodename: Callback to provide a naming hint for a possible
873 * device node to create.
872 * @probe: Called to see if the driver is willing to manage a particular 874 * @probe: Called to see if the driver is willing to manage a particular
873 * device. If it is, probe returns zero and uses dev_set_drvdata() 875 * device. If it is, probe returns zero and uses dev_set_drvdata()
874 * to associate driver-specific data with the device. If unwilling 876 * to associate driver-specific data with the device. If unwilling
@@ -912,6 +914,7 @@ extern struct bus_type usb_bus_type;
912 */ 914 */
913struct usb_class_driver { 915struct usb_class_driver {
914 char *name; 916 char *name;
917 char *(*nodename)(struct device *dev);
915 const struct file_operations *fops; 918 const struct file_operations *fops;
916 int minor_base; 919 int minor_base;
917}; 920};