aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/usb.h
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2008-04-30 15:37:19 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-05-14 10:00:26 -0700
commit2e5f10e4f0a9649186d8a8c793822b2e0dae8373 (patch)
treeb05f66b353cd9537fc031b387c03040d3b92dcc6 /drivers/usb/core/usb.h
parent6986a978eec70c867717fe6bee736f0bd1db1508 (diff)
downloadmrst-s0i3-test-2e5f10e4f0a9649186d8a8c793822b2e0dae8373.tar.gz
mrst-s0i3-test-2e5f10e4f0a9649186d8a8c793822b2e0dae8373.tar.xz
mrst-s0i3-test-2e5f10e4f0a9649186d8a8c793822b2e0dae8373.zip
USB: create attributes before sending uevent
This patch (as1087d) fixes a long-standing problem in usbcore: Device, interface, and endpoint attributes aren't added until _after_ the creation uevent has already been broadcast. Unfortunately there are a few attributes which cannot be created that early. The "descriptors" attribute is binary and so must be created separately. The power-management attributes can't be created until the dev/power/ group exists. And the interface string can vary from one altsetting to another, so it has to be created dynamically. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/core/usb.h')
-rw-r--r--drivers/usb/core/usb.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/core/usb.h b/drivers/usb/core/usb.h
index 1bf8ccb9c58..1a8bc21c335 100644
--- a/drivers/usb/core/usb.h
+++ b/drivers/usb/core/usb.h
@@ -130,6 +130,10 @@ static inline int is_active(const struct usb_interface *f)
/* for labeling diagnostics */
extern const char *usbcore_name;
+/* sysfs stuff */
+extern struct attribute_group *usb_device_groups[];
+extern struct attribute_group *usb_interface_groups[];
+
/* usbfs stuff */
extern struct mutex usbfs_mutex;
extern struct usb_driver usbfs_driver;