hc_driver is available on the same source file and is always passed to probe. By removing that, we can use driver_data to pass more interesting stuff like quirks. That will avoid having to do manual detection of the Vendor/Device again during probe. Signed-off-by: Felipe Balbi <balbi@xxxxxx> --- drivers/usb/host/xhci-pci.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c index cb16de2..f53a13d 100644 --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c @@ -183,6 +183,8 @@ error: return retval; } +static const struct hc_driver xhci_pci_hc_driver; + /* * We need to register our own PCI probe function (instead of the USB core's * function) in order to create a second roothub under xHCI. @@ -191,10 +193,11 @@ static int xhci_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) { int retval; struct xhci_hcd *xhci; - struct hc_driver *driver; + const struct hc_driver *driver; struct usb_hcd *hcd; - driver = (struct hc_driver *)id->driver_data; + driver = &xhci_pci_hc_driver; + /* Register the USB 2.0 roothub. * FIXME: USB core must know to register the USB 2.0 roothub first. * This is sort of silly, because we could just set the HCD driver flags @@ -352,7 +355,6 @@ static const struct hc_driver xhci_pci_hc_driver = { static const struct pci_device_id pci_ids[] = { { /* handle any USB 3.0 xHCI controller */ PCI_DEVICE_CLASS(PCI_CLASS_SERIAL_USB_XHCI, ~0), - .driver_data = (unsigned long) &xhci_pci_hc_driver, }, { /* end: all zeroes */ } }; -- 1.7.6 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html