The hc_driver which comes via data can have a few fields overwritten like the ->reset() callback. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx> --- drivers/usb/host/xhci-pci.c | 2 ++ drivers/usb/host/xhci.c | 12 ++---------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c index 13996a9..b666311 100644 --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c @@ -133,6 +133,8 @@ static int xhci_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) if (dev->revision == 0x0) data.quirks |= XHCI_RESET_EP_QUIRK; } + data.hc_driver = xhci_hc_driver; + data.hc_driver.reset = xhci_pci_plat_reset; pci_set_power_state(dev, PCI_D0); pci_set_master(dev); diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 80bbc08..74b8a9d 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -3122,11 +3122,6 @@ int xhci_setup(struct usb_hcd *hcd) struct xhci_hcd *xhci; int retval; u32 temp; - struct platform_device *plat_dev; - struct xhci_platform_data *data; - - plat_dev = to_platform_device(hcd->self.controller); - data = plat_dev->dev.platform_data; hcd->self.sg_tablesize = TRBS_PER_SEGMENT - 2; @@ -3176,9 +3171,6 @@ int xhci_setup(struct usb_hcd *hcd) xhci->hcc_params = xhci_readl(xhci, &xhci->cap_regs->hcc_params); xhci_print_registers(xhci); - xhci->quirks = data->quirks; - xhci->limit_active_eps = data->limit_active_eps; - /* Make sure the HC is halted. */ retval = xhci_halt(xhci); if (retval) @@ -3280,7 +3272,7 @@ static int xhci_probe(struct platform_device *pdev) goto err0; } - hcd = usb_create_hcd(&xhci_hc_driver, &pdev->dev, + hcd = usb_create_hcd(&data->hc_driver, &pdev->dev, dev_name(&pdev->dev)); if (!hcd) { ret = -ENOMEM; @@ -3318,7 +3310,7 @@ static int xhci_probe(struct platform_device *pdev) } xhci = hcd_to_xhci(hcd); - xhci->shared_hcd = usb_create_shared_hcd(&xhci_hc_driver, &pdev->dev, + xhci->shared_hcd = usb_create_shared_hcd(&data->hc_driver, &pdev->dev, dev_name(&pdev->dev), hcd); if (!xhci->shared_hcd) { dev_err(&pdev->dev, "failed to create shared HCD\n"); -- 1.7.4.4 -- 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