diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2008-12-05 14:10:34 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-01-07 13:00:08 -0500 |
commit | 3b23dd6f8a718e5339de4f7d86ce76a078b5f771 (patch) | |
tree | 500a0402d7d8ba9afefc316124c1a6b4b4d575b2 /include/linux/usb.h | |
parent | b9cef6c31913c34fb1065b1d01e04c3b92c59016 (diff) |
USB: utilize the bus notifiers
This patch (as1185) makes usbcore take advantage of the bus
notifications sent out by the driver core. Now we can create all our
device and interface attribute files before the device or interface
uevent is broadcast.
A side effect is that we no longer create the endpoint "pseudo"
devices at the same time as a device or interface is registered -- it
seems like a bad idea to try registering an endpoint before the
registration of its parent is complete. So the routines for creating
and removing endpoint devices have been split out and renamed, and
they are called explicitly when needed. A new bitflag is used for
keeping track of whether or not the interface's endpoint devices have
been created, since (just as with the interface attributes) they vary
with the altsetting and hence can be changed at random times.
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 'include/linux/usb.h')
-rw-r--r-- | include/linux/usb.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h index 74d0b9990c73..e9d63562325a 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -108,6 +108,7 @@ enum usb_interface_condition { | |||
108 | * (in probe()), bound to a driver, or unbinding (in disconnect()) | 108 | * (in probe()), bound to a driver, or unbinding (in disconnect()) |
109 | * @is_active: flag set when the interface is bound and not suspended. | 109 | * @is_active: flag set when the interface is bound and not suspended. |
110 | * @sysfs_files_created: sysfs attributes exist | 110 | * @sysfs_files_created: sysfs attributes exist |
111 | * @ep_devs_created: endpoint child pseudo-devices exist | ||
111 | * @unregistering: flag set when the interface is being unregistered | 112 | * @unregistering: flag set when the interface is being unregistered |
112 | * @needs_remote_wakeup: flag set when the driver requires remote-wakeup | 113 | * @needs_remote_wakeup: flag set when the driver requires remote-wakeup |
113 | * capability during autosuspend. | 114 | * capability during autosuspend. |
@@ -169,6 +170,7 @@ struct usb_interface { | |||
169 | enum usb_interface_condition condition; /* state of binding */ | 170 | enum usb_interface_condition condition; /* state of binding */ |
170 | unsigned is_active:1; /* the interface is not suspended */ | 171 | unsigned is_active:1; /* the interface is not suspended */ |
171 | unsigned sysfs_files_created:1; /* the sysfs attributes exist */ | 172 | unsigned sysfs_files_created:1; /* the sysfs attributes exist */ |
173 | unsigned ep_devs_created:1; /* endpoint "devices" exist */ | ||
172 | unsigned unregistering:1; /* unregistration is in progress */ | 174 | unsigned unregistering:1; /* unregistration is in progress */ |
173 | unsigned needs_remote_wakeup:1; /* driver requires remote wakeup */ | 175 | unsigned needs_remote_wakeup:1; /* driver requires remote wakeup */ |
174 | unsigned needs_altsetting0:1; /* switch to altsetting 0 is pending */ | 176 | unsigned needs_altsetting0:1; /* switch to altsetting 0 is pending */ |