From: Paul Kocialkowski Date: Fri, 12 Jun 2015 17:57:01 +0000 (+0200) Subject: usb: gadget: Weak board_usb_init/cleanup definitions in USB download gadget code X-Git-Tag: v2015.10-rc1~70^2~10 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=99fc2221a059b2571aedf6ff27d7d17dac2b0994;p=u-boot usb: gadget: Weak board_usb_init/cleanup definitions in USB download gadget code Weak versions of board_usb_init and board_usb_cleanup are defined in common USB host code, but it is also used for USB device gadgets, so we also need a weak definition of it when there is no USB host enabled. Both weak definitions do not conflict. Signed-off-by: Paul Kocialkowski Tested-by: Lukasz Majewski Test HW: Odroid_XU3 (Exynos5422), trats (Exynos4210) --- diff --git a/drivers/usb/gadget/g_dnl.c b/drivers/usb/gadget/g_dnl.c index ee52a29467..ad89a0d2e6 100644 --- a/drivers/usb/gadget/g_dnl.c +++ b/drivers/usb/gadget/g_dnl.c @@ -12,6 +12,7 @@ #include #include +#include #include #include @@ -147,6 +148,18 @@ static int g_dnl_config_register(struct usb_composite_dev *cdev) return usb_add_config(cdev, config); } +__weak +int board_usb_init(int index, enum usb_init_type init) +{ + return 0; +} + +__weak +int board_usb_cleanup(int index, enum usb_init_type init) +{ + return 0; +} + __weak int g_dnl_bind_fixup(struct usb_device_descriptor *dev, const char *name) {