xhci_plat_setup() is the rightful place for xhci_mvebu_mbus_init_quirk(), so let's move it there in order to make it simpler to get rid of xhci_plat_type_is() later on. Signed-off-by: Felipe Balbi <felipe.balbi@xxxxxxxxxxxxxxx> --- drivers/usb/host/xhci-plat.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c index 5c15e9bc5f7a..21b4a52d15c4 100644 --- a/drivers/usb/host/xhci-plat.c +++ b/drivers/usb/host/xhci-plat.c @@ -59,6 +59,15 @@ static int xhci_plat_setup(struct usb_hcd *hcd) return ret; } + if (xhci_plat_type_is(hcd, XHCI_PLAT_TYPE_MARVELL_ARMADA)) { + struct platform_device *pdev; + + pdev = to_platform_device(hcd->self.controller); + ret = xhci_mvebu_mbus_init_quirk(pdev); + if (ret) + return ret; + } + return xhci_gen_setup(hcd, xhci_plat_quirks); } @@ -194,12 +203,6 @@ static int xhci_plat_probe(struct platform_device *pdev) *priv = *priv_match; } - if (xhci_plat_type_is(hcd, XHCI_PLAT_TYPE_MARVELL_ARMADA)) { - ret = xhci_mvebu_mbus_init_quirk(pdev); - if (ret) - goto disable_clk; - } - device_wakeup_enable(hcd->self.controller); xhci->clk = clk; -- 2.8.0.rc2 -- 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