diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-08-12 07:42:51 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-08-12 07:42:51 +0200 |
commit | 51fa228c8e05c58f51c97bbc571be94c4592a85e (patch) | |
tree | 494028747238cf9edb0f6187f1bfaeccc762ceb0 /drivers/usb/core/usb.h | |
parent | 92b8608691bf129b1137be46a3a0058bcacc97a9 (diff) | |
parent | d45331b00ddb179e291766617259261c112db872 (diff) | |
download | linux-51fa228c8e05c58f51c97bbc571be94c4592a85e.tar.gz |
Merge 5.3-rc4 into usb-next
We need the USB fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/core/usb.h')
-rw-r--r-- | drivers/usb/core/usb.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/usb/core/usb.h b/drivers/usb/core/usb.h index 2932d1ec5def..cf4783cf661a 100644 --- a/drivers/usb/core/usb.h +++ b/drivers/usb/core/usb.h @@ -156,6 +156,11 @@ static inline int is_usb_port(const struct device *dev) return dev->type == &usb_port_device_type; } +static inline int is_root_hub(struct usb_device *udev) +{ + return (udev->parent == NULL); +} + /* Do the same for device drivers and interface drivers. */ static inline int is_usb_device_driver(struct device_driver *drv) |