]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
usb: host: xhci: plat: change type of mvebu init_quirk()
authorFelipe Balbi <felipe.balbi@linux.intel.com>
Fri, 22 Apr 2016 10:17:15 +0000 (13:17 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 26 Apr 2016 23:08:02 +0000 (16:08 -0700)
Just like RCAR's init_quirk() we want mvebu's to use
struct usb_hcd * as argument too. This is another
step towards removing xhci_plat_type_is().

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-mvebu.c
drivers/usb/host/xhci-mvebu.h
drivers/usb/host/xhci-plat.c

index 1eefc988192d038e5932894b41950d9e58f36de9..85908a3ecb8f6a8719ae086abf9191f0dc9feacb 100644 (file)
@@ -12,6 +12,9 @@
 #include <linux/of.h>
 #include <linux/platform_device.h>
 
+#include <linux/usb.h>
+#include <linux/usb/hcd.h>
+
 #include "xhci-mvebu.h"
 
 #define USB3_MAX_WINDOWS       4
@@ -41,8 +44,10 @@ static void xhci_mvebu_mbus_config(void __iomem *base,
        }
 }
 
-int xhci_mvebu_mbus_init_quirk(struct platform_device *pdev)
+int xhci_mvebu_mbus_init_quirk(struct usb_hcd *hcd)
 {
+       struct device *dev = hcd->self.controller;
+       struct platform_device *pdev = to_platform_device(dev);
        struct resource *res;
        void __iomem *base;
        const struct mbus_dram_target_info *dram;
index 7ede92aa41f600ddace2940baa0847a1d8359d48..301fc984cae60e39b74578a230e9e72c765ae328 100644 (file)
 
 #ifndef __LINUX_XHCI_MVEBU_H
 #define __LINUX_XHCI_MVEBU_H
+
+struct usb_hcd;
+
 #if IS_ENABLED(CONFIG_USB_XHCI_MVEBU)
-int xhci_mvebu_mbus_init_quirk(struct platform_device *pdev);
+int xhci_mvebu_mbus_init_quirk(struct usb_hcd *hcd);
 #else
-static inline int xhci_mvebu_mbus_init_quirk(struct platform_device *pdev)
+static inline int xhci_mvebu_mbus_init_quirk(struct usb_hcd *hcd)
 {
        return 0;
 }
index 4fcb3418e7a7ecc2bb0fdb915ccc2a407219da3e..9bdf016d90807947f2d8f9ff70d710174bb98167 100644 (file)
@@ -73,10 +73,7 @@ static int xhci_plat_setup(struct usb_hcd *hcd)
        }
 
        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);
+               ret = xhci_mvebu_mbus_init_quirk(hcd);
                if (ret)
                        return ret;
        }