aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
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 /drivers/usb
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 'drivers/usb')
-rw-r--r--drivers/usb/core/usb.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/core/usb.h b/drivers/usb/core/usb.h
index cc42972b6bb0..74df0db954c9 100644
--- a/drivers/usb/core/usb.h
+++ b/drivers/usb/core/usb.h
@@ -59,17 +59,17 @@ static inline int is_usb_device_driver(struct device_driver *drv)
59 59
60static inline void mark_active(struct usb_interface *f) 60static inline void mark_active(struct usb_interface *f)
61{ 61{
62 f->dev.power.power_state.event = PM_EVENT_ON; 62 f->is_active = 1;
63} 63}
64 64
65static inline void mark_quiesced(struct usb_interface *f) 65static inline void mark_quiesced(struct usb_interface *f)
66{ 66{
67 f->dev.power.power_state.event = PM_EVENT_FREEZE; 67 f->is_active = 0;
68} 68}
69 69
70static inline int is_active(struct usb_interface *f) 70static inline int is_active(struct usb_interface *f)
71{ 71{
72 return f->dev.power.power_state.event == PM_EVENT_ON; 72 return f->is_active;
73} 73}
74 74
75 75