diff options
-rw-r--r-- | drivers/usb/core/usb.h | 6 | ||||
-rw-r--r-- | include/linux/usb.h | 3 |
2 files changed, 6 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 | ||
60 | static inline void mark_active(struct usb_interface *f) | 60 | static 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 | ||
65 | static inline void mark_quiesced(struct usb_interface *f) | 65 | static 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 | ||
70 | static inline int is_active(struct usb_interface *f) | 70 | static 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 | ||
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 | }; |