diff options
author | Lukasz Majewski <l.majewski@samsung.com> | 2013-08-19 17:17:19 +0200 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2013-08-26 21:56:34 +0200 |
commit | c4219a82cdf1e5f6009e2318b7cc008a93998574 (patch) | |
tree | e1989397d5164a3b9f05130294514966a49b90a3 /drivers/usb | |
parent | cfc2d0d63246668ae91cfcbb7a7bad63e999ed0a (diff) | |
download | u-boot-imx-c4219a82cdf1e5f6009e2318b7cc008a93998574.zip u-boot-imx-c4219a82cdf1e5f6009e2318b7cc008a93998574.tar.gz u-boot-imx-c4219a82cdf1e5f6009e2318b7cc008a93998574.tar.bz2 |
usb:dfu:g_dnl: Refactoring the string definition code for g_dnl driver
The manufacturer and product IDs are dynamically assigned when gadget is
bind.
Now the IDs aren't assigned at struct g_dnl_string_defs definition.
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Cc: Marek Vasut <marex@denx.de>
Cc: "Egli, Samuel" <samuel.egli@siemens.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/gadget/g_dnl.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/usb/gadget/g_dnl.c b/drivers/usb/gadget/g_dnl.c index 3cb7302..a3e05a8 100644 --- a/drivers/usb/gadget/g_dnl.c +++ b/drivers/usb/gadget/g_dnl.c @@ -56,11 +56,14 @@ static struct usb_device_descriptor device_desc = { .bNumConfigurations = 1, }; -/* static strings, in UTF-8 */ +/* + * static strings, in UTF-8 + * IDs for those strings are assigned dynamically at g_dnl_bind() + */ static struct usb_string g_dnl_string_defs[] = { - { 0, manufacturer, }, - { 1, product, }, - { } /* end of list */ + {.s = manufacturer}, + {.s = product}, + { } /* end of list */ }; static struct usb_gadget_strings g_dnl_string_tab = { |