summaryrefslogtreecommitdiff
path: root/drivers/usb/core/hcd-pci.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2016-05-04 14:41:51 +0100
committerMark Brown <broonie@kernel.org>2016-05-04 14:41:51 +0100
commit3d277b177918cd26215732fc23af0783ab4b37dd (patch)
tree2033b4f517415e9e68eb066fa073b79a3884e03d /drivers/usb/core/hcd-pci.c
parentf55532a0c0b8bb6148f4e07853b876ef73bc69ca (diff)
parent02da2d72174c61988eb4456b53f405e3ebdebce4 (diff)
downloadlinux-3d277b177918cd26215732fc23af0783ab4b37dd.tar.gz
linux-3d277b177918cd26215732fc23af0783ab4b37dd.tar.xz
Merge tag 'v4.6-rc5' into spi-rockchip
Linux 4.6-rc5
Diffstat (limited to 'drivers/usb/core/hcd-pci.c')
-rw-r--r--drivers/usb/core/hcd-pci.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c
index f9d42cf23e55..7859d738df41 100644
--- a/drivers/usb/core/hcd-pci.c
+++ b/drivers/usb/core/hcd-pci.c
@@ -73,6 +73,15 @@ static void for_each_companion(struct pci_dev *pdev, struct usb_hcd *hcd,
if (companion->bus != pdev->bus ||
PCI_SLOT(companion->devfn) != slot)
continue;
+
+ /*
+ * Companion device should be either UHCI,OHCI or EHCI host
+ * controller, otherwise skip.
+ */
+ if (companion->class != CL_UHCI && companion->class != CL_OHCI &&
+ companion->class != CL_EHCI)
+ continue;
+
companion_hcd = pci_get_drvdata(companion);
if (!companion_hcd || !companion_hcd->self.root_hub)
continue;