diff options
Diffstat (limited to 'drivers/usb/core/usb.h')
-rw-r--r-- | drivers/usb/core/usb.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/usb/core/usb.h b/drivers/usb/core/usb.h index 79d8a9ea559b..e2a8cfaade1d 100644 --- a/drivers/usb/core/usb.h +++ b/drivers/usb/core/usb.h | |||
@@ -41,8 +41,6 @@ extern int usb_hub_init(void); | |||
41 | extern void usb_hub_cleanup(void); | 41 | extern void usb_hub_cleanup(void); |
42 | extern int usb_major_init(void); | 42 | extern int usb_major_init(void); |
43 | extern void usb_major_cleanup(void); | 43 | extern void usb_major_cleanup(void); |
44 | extern int usb_host_init(void); | ||
45 | extern void usb_host_cleanup(void); | ||
46 | 44 | ||
47 | #ifdef CONFIG_PM | 45 | #ifdef CONFIG_PM |
48 | 46 | ||
@@ -106,6 +104,7 @@ extern struct workqueue_struct *ksuspend_usb_wq; | |||
106 | extern struct bus_type usb_bus_type; | 104 | extern struct bus_type usb_bus_type; |
107 | extern struct device_type usb_device_type; | 105 | extern struct device_type usb_device_type; |
108 | extern struct device_type usb_if_device_type; | 106 | extern struct device_type usb_if_device_type; |
107 | extern struct device_type usb_ep_device_type; | ||
109 | extern struct usb_device_driver usb_generic_driver; | 108 | extern struct usb_device_driver usb_generic_driver; |
110 | 109 | ||
111 | static inline int is_usb_device(const struct device *dev) | 110 | static inline int is_usb_device(const struct device *dev) |
@@ -113,6 +112,16 @@ static inline int is_usb_device(const struct device *dev) | |||
113 | return dev->type == &usb_device_type; | 112 | return dev->type == &usb_device_type; |
114 | } | 113 | } |
115 | 114 | ||
115 | static inline int is_usb_interface(const struct device *dev) | ||
116 | { | ||
117 | return dev->type == &usb_if_device_type; | ||
118 | } | ||
119 | |||
120 | static inline int is_usb_endpoint(const struct device *dev) | ||
121 | { | ||
122 | return dev->type == &usb_ep_device_type; | ||
123 | } | ||
124 | |||
116 | /* Do the same for device drivers and interface drivers. */ | 125 | /* Do the same for device drivers and interface drivers. */ |
117 | 126 | ||
118 | static inline int is_usb_device_driver(struct device_driver *drv) | 127 | static inline int is_usb_device_driver(struct device_driver *drv) |