From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lukasz Majewski Date: Mon, 19 Aug 2013 17:17:19 +0200 Subject: [U-Boot] [PATCH 2/2] usb:dfu:g_dnl: Refactoring the string definition code for g_dnl driver In-Reply-To: <1376925439-29997-1-git-send-email-l.majewski@samsung.com> References: <1376925439-29997-1-git-send-email-l.majewski@samsung.com> Message-ID: <1376925439-29997-2-git-send-email-l.majewski@samsung.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 Cc: Marek Vasut Cc: "Egli, Samuel" --- drivers/usb/gadget/g_dnl.c | 11 +++++++---- 1 file 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 = { -- 1.7.10.4