From: Heiko Schocher Date: Tue, 4 Jun 2013 09:19:50 +0000 (+0200) Subject: usb, g_dnl: make possibility to fixup the device_desc board specific X-Git-Tag: v2013.07-rc3~26^2~4 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=c5398cc968793cb73752d98e69f2e8d3cc9d9e59;p=oweals%2Fu-boot.git usb, g_dnl: make possibility to fixup the device_desc board specific add a weak dummy function g_dnl_fixup to add the possibility to update the device_desc board specific. Used on the upcoming siemens board support, where idVendor and idProduct is stored in an eeprom. Signed-off-by: Heiko Schocher Cc: Marek Vasut Cc: Lukasz Majewski Cc: Kyungmin Park Reviewed-by: Lukasz Majewski --- diff --git a/drivers/usb/gadget/g_dnl.c b/drivers/usb/gadget/g_dnl.c index cc3f3449c9..8a3777b6e0 100644 --- a/drivers/usb/gadget/g_dnl.c +++ b/drivers/usb/gadget/g_dnl.c @@ -125,6 +125,12 @@ static int g_dnl_config_register(struct usb_composite_dev *cdev) return usb_add_config(cdev, &config); } +__weak +int g_dnl_bind_fixup(struct usb_device_descriptor *dev) +{ + return 0; +} + static int g_dnl_bind(struct usb_composite_dev *cdev) { struct usb_gadget *gadget = cdev->gadget; @@ -147,6 +153,7 @@ static int g_dnl_bind(struct usb_composite_dev *cdev) g_dnl_string_defs[1].id = id; device_desc.iProduct = id; + g_dnl_bind_fixup(&device_desc); ret = g_dnl_config_register(cdev); if (ret) goto error; diff --git a/include/g_dnl.h b/include/g_dnl.h index f47395f35d..f8affd8d91 100644 --- a/include/g_dnl.h +++ b/include/g_dnl.h @@ -23,7 +23,7 @@ #include #include - +int g_dnl_bind_fixup(struct usb_device_descriptor *); int g_dnl_register(const char *s); void g_dnl_unregister(void);