summaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/usb.h
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-08-12 07:42:51 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-08-12 07:42:51 +0200
commit51fa228c8e05c58f51c97bbc571be94c4592a85e (patch)
tree494028747238cf9edb0f6187f1bfaeccc762ceb0 /drivers/usb/core/usb.h
parent92b8608691bf129b1137be46a3a0058bcacc97a9 (diff)
parentd45331b00ddb179e291766617259261c112db872 (diff)
downloadlinux-stable-51fa228c8e05c58f51c97bbc571be94c4592a85e.tar.gz
linux-stable-51fa228c8e05c58f51c97bbc571be94c4592a85e.tar.bz2
linux-stable-51fa228c8e05c58f51c97bbc571be94c4592a85e.zip
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.h5
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)