Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

usb: host: xhci: plat: change type of mvebu init_quirk()

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>

authored by

Felipe Balbi and committed by
Greg Kroah-Hartman
72d4b284 3bdb263d

+12 -7
+6 -1
drivers/usb/host/xhci-mvebu.c
··· 12 12 #include <linux/of.h> 13 13 #include <linux/platform_device.h> 14 14 15 + #include <linux/usb.h> 16 + #include <linux/usb/hcd.h> 17 + 15 18 #include "xhci-mvebu.h" 16 19 17 20 #define USB3_MAX_WINDOWS 4 ··· 44 41 } 45 42 } 46 43 47 - int xhci_mvebu_mbus_init_quirk(struct platform_device *pdev) 44 + int xhci_mvebu_mbus_init_quirk(struct usb_hcd *hcd) 48 45 { 46 + struct device *dev = hcd->self.controller; 47 + struct platform_device *pdev = to_platform_device(dev); 49 48 struct resource *res; 50 49 void __iomem *base; 51 50 const struct mbus_dram_target_info *dram;
+5 -2
drivers/usb/host/xhci-mvebu.h
··· 10 10 11 11 #ifndef __LINUX_XHCI_MVEBU_H 12 12 #define __LINUX_XHCI_MVEBU_H 13 + 14 + struct usb_hcd; 15 + 13 16 #if IS_ENABLED(CONFIG_USB_XHCI_MVEBU) 14 - int xhci_mvebu_mbus_init_quirk(struct platform_device *pdev); 17 + int xhci_mvebu_mbus_init_quirk(struct usb_hcd *hcd); 15 18 #else 16 - static inline int xhci_mvebu_mbus_init_quirk(struct platform_device *pdev) 19 + static inline int xhci_mvebu_mbus_init_quirk(struct usb_hcd *hcd) 17 20 { 18 21 return 0; 19 22 }
+1 -4
drivers/usb/host/xhci-plat.c
··· 73 73 } 74 74 75 75 if (xhci_plat_type_is(hcd, XHCI_PLAT_TYPE_MARVELL_ARMADA)) { 76 - struct platform_device *pdev; 77 - 78 - pdev = to_platform_device(hcd->self.controller); 79 - ret = xhci_mvebu_mbus_init_quirk(pdev); 76 + ret = xhci_mvebu_mbus_init_quirk(hcd); 80 77 if (ret) 81 78 return ret; 82 79 }