usb: host: xhci: plat: move mvebu init_quirk() to xhci_plat_setup()
authorFelipe Balbi <felipe.balbi@linux.intel.com>
Fri, 22 Apr 2016 10:17:14 +0000 (13:17 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 26 Apr 2016 23:08:02 +0000 (16:08 -0700)
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.

Acked-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-plat.c

index 474b5fa149007b8869f56671b6e3fed1050b9edf..4fcb3418e7a7ecc2bb0fdb915ccc2a407219da3e 100644 (file)
@@ -72,6 +72,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);
 }
 
@@ -207,12 +216,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;