aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2006-07-01 22:11:44 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-09-27 14:58:50 -0400
commit4d064c080265a41324d108fccc26b72106d43db3 (patch)
tree78418a918af1ca6fa33bca474cc086fc6fa74caf /include
parenta8e7c5653562f88c0f5f53eac0a890c012655789 (diff)
usbcore: track whether interfaces are suspended
Currently we rely on intf->dev.power.power_state.event for tracking whether intf is suspended. This is not a reliable technique because that value is owned by the PM core, not by usbcore. This patch (as718b) adds a new flag so that we can accurately tell which interfaces are suspended and which aren't. At first one might think these flags aren't needed, since interfaces will be suspended along with their devices. It turns out there are a couple of intermediate situations where that's not quite true, such as while processing a remote-wakeup request. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include')
-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 b4ccce6d0982..e22f4b386605 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -102,6 +102,7 @@ enum usb_interface_condition {
102 * number from the USB core by calling usb_register_dev(). 102 * number from the USB core by calling usb_register_dev().
103 * @condition: binding state of the interface: not bound, binding 103 * @condition: binding state of the interface: not bound, binding
104 * (in probe()), bound to a driver, or unbinding (in disconnect()) 104 * (in probe()), bound to a driver, or unbinding (in disconnect())
105 * @is_active: flag set when the interface is bound and not suspended.
105 * @dev: driver model's view of this device 106 * @dev: driver model's view of this device
106 * @class_dev: driver model's class view of this device. 107 * @class_dev: driver model's class view of this device.
107 * 108 *
@@ -142,6 +143,8 @@ struct usb_interface {
142 int minor; /* minor number this interface is 143 int minor; /* minor number this interface is
143 * bound to */ 144 * bound to */
144 enum usb_interface_condition condition; /* state of binding */ 145 enum usb_interface_condition condition; /* state of binding */
146 unsigned is_active:1; /* the interface is not suspended */
147
145 struct device dev; /* interface specific device info */ 148 struct device dev; /* interface specific device info */
146 struct class_device *class_dev; 149 struct class_device *class_dev;
147}; 150};