From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lukasz Majewski Date: Mon, 18 May 2015 15:02:48 +0200 Subject: [U-Boot] [PATCH 4/4] usb: gadget: Weak board_usb_init/cleanup definitions in USB download gadget code In-Reply-To: <1431798665-28790-4-git-send-email-contact@paulk.fr> References: <1431798665-28790-1-git-send-email-contact@paulk.fr> <1431798665-28790-4-git-send-email-contact@paulk.fr> Message-ID: <20150518150248.046648e5@amdc2363> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Paul, > 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 > --- > drivers/usb/gadget/g_dnl.c | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/drivers/usb/gadget/g_dnl.c b/drivers/usb/gadget/g_dnl.c > index ee52a29..ad89a0d 100644 > --- a/drivers/usb/gadget/g_dnl.c > +++ b/drivers/usb/gadget/g_dnl.c > @@ -12,6 +12,7 @@ > > #include > #include > +#include > > #include > #include > @@ -148,6 +149,18 @@ static int g_dnl_config_register(struct > usb_composite_dev *cdev) } > > __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) { > return 0; Acked-by: Lukasz Majewski I will test this patch on my devices and then pull it to u-boot-dfu tree. Thanks for your work! -- Best regards, Lukasz Majewski Samsung R&D Institute Poland (SRPOL) | Linux Platform Group