summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorUri Mashiach <uri.mashiach@compulab.co.il>2017-02-23 13:39:37 (GMT)
committerTom Rini <trini@konsulko.com>2017-05-08 15:38:37 (GMT)
commit1a9a5f7a39d655868d7e51327786ca6bccbbec68 (patch)
treefda5f24a059c931e40ad94f0aeeb971c0d067371 /drivers/usb
parentef3f3b8100b28f2110c8a5f5181a5d6ee5db9160 (diff)
downloadu-boot-fsl-qoriq-1a9a5f7a39d655868d7e51327786ca6bccbbec68.tar.xz
usb: host: xhci-omap: fix double weak board_usb_init functions
A weak version of the function board_usb_init is implemented in: common/usb.c drivers/usb/host/xhci-omap.c To fix the double implementations: * Convert the board_usb_init function in drivers/usb/host/xhci-omap.c normal (not weak). * The function board_usb_init in drivers/usb/host/xhci-omap.c calls to the weak function omap_xhci_board_usb_init. * Rename board version of the function board_usb_init to omap_xhci_board_usb_init. Done only for boards that defines CONFIG_USB_XHCI_OMAP. To achieve the same flexibility with the function board_usb_cleanup: * Add a normal (not weak) implementation of the function board_usb_cleanup in drivers/usb/host/xhci-omap.c * The function board_usb_cleanup in drivers/usb/host/xhci-omap.c calls to the weak function omap_xhci_board_usb_cleanup. * Rename board version of the function board_usb_cleanup to omap_xhci_board_usb_cleanup. Done only for boards that defines CONFIG_USB_XHCI_OMAP. Cc: Lokesh Vutla <lokeshvutla@ti.com> Signed-off-by: Uri Mashiach <uri.mashiach@compulab.co.il> Acked-by: Marek Vasut <marex@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Roger Quadros <rogerq@ti.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/host/xhci-omap.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/drivers/usb/host/xhci-omap.c b/drivers/usb/host/xhci-omap.c
index b881b19..a1b4f2f 100644
--- a/drivers/usb/host/xhci-omap.c
+++ b/drivers/usb/host/xhci-omap.c
@@ -27,12 +27,25 @@ DECLARE_GLOBAL_DATA_PTR;
static struct omap_xhci omap;
-__weak int __board_usb_init(int index, enum usb_init_type init)
+__weak int omap_xhci_board_usb_init(int index, enum usb_init_type init)
{
return 0;
}
+
int board_usb_init(int index, enum usb_init_type init)
- __attribute__((weak, alias("__board_usb_init")));
+{
+ return omap_xhci_board_usb_init(index, init);
+}
+
+__weak int omap_xhci_board_usb_cleanup(int index, enum usb_init_type init)
+{
+ return 0;
+}
+
+int board_usb_cleanup(int index, enum usb_init_type init)
+{
+ return omap_xhci_board_usb_cleanup(index, init);
+}
static int omap_xhci_core_init(struct omap_xhci *omap)
{