From: Lukasz Majewski <l.majewski@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2] usb:dfu:g_dnl: Refactoring the string definition code for g_dnl driver
Date: Mon, 19 Aug 2013 17:17:19 +0200 [thread overview]
Message-ID: <1376925439-29997-2-git-send-email-l.majewski@samsung.com> (raw)
In-Reply-To: <1376925439-29997-1-git-send-email-l.majewski@samsung.com>
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>
---
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
next prev parent reply other threads:[~2013-08-19 15:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-19 15:17 [U-Boot] [PATCH 1/2] usb:dfu:g_dnl: Change number of exported configurations at composite gadget Lukasz Majewski
2013-08-19 15:17 ` Lukasz Majewski [this message]
2013-08-19 22:51 ` Marek Vasut
2013-08-20 15:10 ` Egli, Samuel
2013-08-21 3:16 ` Marek Vasut
2013-08-21 6:19 ` Lukasz Majewski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1376925439-29997-2-git-send-email-l.majewski@samsung.com \
--to=l.majewski@samsung.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox