aboutsummaryrefslogtreecommitdiffstats
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.h13
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);
41extern void usb_hub_cleanup(void); 41extern void usb_hub_cleanup(void);
42extern int usb_major_init(void); 42extern int usb_major_init(void);
43extern void usb_major_cleanup(void); 43extern void usb_major_cleanup(void);
44extern int usb_host_init(void);
45extern 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;
106extern struct bus_type usb_bus_type; 104extern struct bus_type usb_bus_type;
107extern struct device_type usb_device_type; 105extern struct device_type usb_device_type;
108extern struct device_type usb_if_device_type; 106extern struct device_type usb_if_device_type;
107extern struct device_type usb_ep_device_type;
109extern struct usb_device_driver usb_generic_driver; 108extern struct usb_device_driver usb_generic_driver;
110 109
111static inline int is_usb_device(const struct device *dev) 110static 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
115static inline int is_usb_interface(const struct device *dev)
116{
117 return dev->type == &usb_if_device_type;
118}
119
120static 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
118static inline int is_usb_device_driver(struct device_driver *drv) 127static inline int is_usb_device_driver(struct device_driver *drv)