aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/core/usb.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/core/usb.h')
-rw-r--r--drivers/usb/core/usb.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/usb/core/usb.h b/drivers/usb/core/usb.h
index e6504f3370a..3741a990403 100644
--- a/drivers/usb/core/usb.h
+++ b/drivers/usb/core/usb.h
@@ -28,6 +28,24 @@ extern void usb_major_cleanup(void);
extern int usb_host_init(void);
extern void usb_host_cleanup(void);
+/* Interfaces and their "power state" are owned by usbcore */
+
+static inline void mark_active(struct usb_interface *f)
+{
+ f->dev.power.power_state.event = PM_EVENT_ON;
+}
+
+static inline void mark_quiesced(struct usb_interface *f)
+{
+ f->dev.power.power_state.event = PM_EVENT_FREEZE;
+}
+
+static inline int is_active(struct usb_interface *f)
+{
+ return f->dev.power.power_state.event == PM_EVENT_ON;
+}
+
+
/* for labeling diagnostics */
extern const char *usbcore_name;