diff options
Diffstat (limited to 'drivers/usb/core/usb.h')
-rw-r--r-- | drivers/usb/core/usb.h | 49 |
1 files changed, 6 insertions, 43 deletions
diff --git a/drivers/usb/core/usb.h b/drivers/usb/core/usb.h index 2b74a7f99c41..cd882203ad34 100644 --- a/drivers/usb/core/usb.h +++ b/drivers/usb/core/usb.h | |||
@@ -55,25 +55,8 @@ extern void usb_major_cleanup(void); | |||
55 | extern int usb_suspend(struct device *dev, pm_message_t msg); | 55 | extern int usb_suspend(struct device *dev, pm_message_t msg); |
56 | extern int usb_resume(struct device *dev, pm_message_t msg); | 56 | extern int usb_resume(struct device *dev, pm_message_t msg); |
57 | 57 | ||
58 | extern void usb_autosuspend_work(struct work_struct *work); | ||
59 | extern void usb_autoresume_work(struct work_struct *work); | ||
60 | extern int usb_port_suspend(struct usb_device *dev, pm_message_t msg); | 58 | extern int usb_port_suspend(struct usb_device *dev, pm_message_t msg); |
61 | extern int usb_port_resume(struct usb_device *dev, pm_message_t msg); | 59 | extern int usb_port_resume(struct usb_device *dev, pm_message_t msg); |
62 | extern int usb_external_suspend_device(struct usb_device *udev, | ||
63 | pm_message_t msg); | ||
64 | extern int usb_external_resume_device(struct usb_device *udev, | ||
65 | pm_message_t msg); | ||
66 | extern int usb_remote_wakeup(struct usb_device *dev); | ||
67 | |||
68 | static inline void usb_pm_lock(struct usb_device *udev) | ||
69 | { | ||
70 | mutex_lock_nested(&udev->pm_mutex, udev->level); | ||
71 | } | ||
72 | |||
73 | static inline void usb_pm_unlock(struct usb_device *udev) | ||
74 | { | ||
75 | mutex_unlock(&udev->pm_mutex); | ||
76 | } | ||
77 | 60 | ||
78 | #else | 61 | #else |
79 | 62 | ||
@@ -87,14 +70,6 @@ static inline int usb_port_resume(struct usb_device *udev, pm_message_t msg) | |||
87 | return 0; | 70 | return 0; |
88 | } | 71 | } |
89 | 72 | ||
90 | static inline int usb_remote_wakeup(struct usb_device *udev) | ||
91 | { | ||
92 | return 0; | ||
93 | } | ||
94 | |||
95 | static inline void usb_pm_lock(struct usb_device *udev) {} | ||
96 | static inline void usb_pm_unlock(struct usb_device *udev) {} | ||
97 | |||
98 | #endif | 73 | #endif |
99 | 74 | ||
100 | #ifdef CONFIG_USB_SUSPEND | 75 | #ifdef CONFIG_USB_SUSPEND |
@@ -102,6 +77,7 @@ static inline void usb_pm_unlock(struct usb_device *udev) {} | |||
102 | extern void usb_autosuspend_device(struct usb_device *udev); | 77 | extern void usb_autosuspend_device(struct usb_device *udev); |
103 | extern void usb_try_autosuspend_device(struct usb_device *udev); | 78 | extern void usb_try_autosuspend_device(struct usb_device *udev); |
104 | extern int usb_autoresume_device(struct usb_device *udev); | 79 | extern int usb_autoresume_device(struct usb_device *udev); |
80 | extern int usb_remote_wakeup(struct usb_device *dev); | ||
105 | 81 | ||
106 | #else | 82 | #else |
107 | 83 | ||
@@ -112,9 +88,13 @@ static inline int usb_autoresume_device(struct usb_device *udev) | |||
112 | return 0; | 88 | return 0; |
113 | } | 89 | } |
114 | 90 | ||
91 | static inline int usb_remote_wakeup(struct usb_device *udev) | ||
92 | { | ||
93 | return 0; | ||
94 | } | ||
95 | |||
115 | #endif | 96 | #endif |
116 | 97 | ||
117 | extern struct workqueue_struct *ksuspend_usb_wq; | ||
118 | extern struct bus_type usb_bus_type; | 98 | extern struct bus_type usb_bus_type; |
119 | extern struct device_type usb_device_type; | 99 | extern struct device_type usb_device_type; |
120 | extern struct device_type usb_if_device_type; | 100 | extern struct device_type usb_if_device_type; |
@@ -144,23 +124,6 @@ static inline int is_usb_device_driver(struct device_driver *drv) | |||
144 | for_devices; | 124 | for_devices; |
145 | } | 125 | } |
146 | 126 | ||
147 | /* Interfaces and their "power state" are owned by usbcore */ | ||
148 | |||
149 | static inline void mark_active(struct usb_interface *f) | ||
150 | { | ||
151 | f->is_active = 1; | ||
152 | } | ||
153 | |||
154 | static inline void mark_quiesced(struct usb_interface *f) | ||
155 | { | ||
156 | f->is_active = 0; | ||
157 | } | ||
158 | |||
159 | static inline int is_active(const struct usb_interface *f) | ||
160 | { | ||
161 | return f->is_active; | ||
162 | } | ||
163 | |||
164 | 127 | ||
165 | /* for labeling diagnostics */ | 128 | /* for labeling diagnostics */ |
166 | extern const char *usbcore_name; | 129 | extern const char *usbcore_name; |