From: Jassi Brar <jaswinder.singh-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
To: balbi-l0cyMroinI0@public.gmane.org
Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
greg-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org,
alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org,
zonque-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
yadi.brar01-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
jaredwiltshire-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
Jassi Brar
<jaswinder.singh-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Subject: [PATCH 3/4] USB: Gadget: Audio: Move string IDs to audio.c
Date: Thu, 2 Feb 2012 22:01:12 +0530 [thread overview]
Message-ID: <1328200272-32020-1-git-send-email-jaswinder.singh@linaro.org> (raw)
In-Reply-To: <CABb+yY3X0XDk0zByZZcJOO0h2Kxu14UD4w-GS7p1HPAAWU3SVA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
Move manufacturer and product string ids into audio.c so
as to be reusable by the new uac2 version of gadget driver.
Signed-off-by: Yadi Brar <yadi.brar01-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Signed-off-by: Jassi Brar <jaswinder.singh-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
---
drivers/usb/gadget/audio.c | 23 +++++++++++++++++++++++
drivers/usb/gadget/f_uac1.c | 23 -----------------------
2 files changed, 23 insertions(+), 23 deletions(-)
diff --git a/drivers/usb/gadget/audio.c b/drivers/usb/gadget/audio.c
index 056a2d9..33e9327 100644
--- a/drivers/usb/gadget/audio.c
+++ b/drivers/usb/gadget/audio.c
@@ -33,6 +33,29 @@
#include "config.c"
#include "epautoconf.c"
+/* string IDs are assigned dynamically */
+
+#define STRING_MANUFACTURER_IDX 0
+#define STRING_PRODUCT_IDX 1
+
+static char manufacturer[50];
+
+static struct usb_string strings_dev[] = {
+ [STRING_MANUFACTURER_IDX].s = manufacturer,
+ [STRING_PRODUCT_IDX].s = DRIVER_DESC,
+ { } /* end of list */
+};
+
+static struct usb_gadget_strings stringtab_dev = {
+ .language = 0x0409, /* en-us */
+ .strings = strings_dev,
+};
+
+static struct usb_gadget_strings *audio_strings[] = {
+ &stringtab_dev,
+ NULL,
+};
+
#include "u_uac1.c"
#include "f_uac1.c"
diff --git a/drivers/usb/gadget/f_uac1.c b/drivers/usb/gadget/f_uac1.c
index e4c060f..1a5dcd5 100644
--- a/drivers/usb/gadget/f_uac1.c
+++ b/drivers/usb/gadget/f_uac1.c
@@ -216,29 +216,6 @@ static struct usb_descriptor_header *f_audio_desc[] __initdata = {
NULL,
};
-/* string IDs are assigned dynamically */
-
-#define STRING_MANUFACTURER_IDX 0
-#define STRING_PRODUCT_IDX 1
-
-static char manufacturer[50];
-
-static struct usb_string strings_dev[] = {
- [STRING_MANUFACTURER_IDX].s = manufacturer,
- [STRING_PRODUCT_IDX].s = DRIVER_DESC,
- { } /* end of list */
-};
-
-static struct usb_gadget_strings stringtab_dev = {
- .language = 0x0409, /* en-us */
- .strings = strings_dev,
-};
-
-static struct usb_gadget_strings *audio_strings[] = {
- &stringtab_dev,
- NULL,
-};
next prev parent reply other threads:[~2012-02-02 16:31 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-19 11:22 [PATCH 2/2] USB: Gadget: Add Audio Class 2.0 Driver Jassi Brar
[not found] ` <1313752934-20081-1-git-send-email-jassisinghbrar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-08-22 11:30 ` Felipe Balbi
[not found] ` <20110822113002.GD30398-UiBtZHVXSwEVvW8u9ZQWYwjfymiNCTlR@public.gmane.org>
2011-08-22 12:37 ` Jassi Brar
[not found] ` <CAJe_Zhdb7d23_x=1GWV2EnEjdn69XBKEz+hCeCuBx4v9XAmykg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-08-22 12:44 ` Felipe Balbi
2011-08-22 13:00 ` Jassi Brar
[not found] ` <CABb+yY3QxvHf38-qfD5ig77nJK=0eVLiSPVpbTh_DCfHNGRyGQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-08-22 13:46 ` Felipe Balbi
[not found] ` <20110822134627.GP30398-UiBtZHVXSwEVvW8u9ZQWYwjfymiNCTlR@public.gmane.org>
2011-08-22 14:00 ` Jassi Brar
[not found] ` <CABb+yY2m2MfkFwf+XTdKzsCCeSFz_J2LoGxJricamhNtTcSAcg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-08-22 14:28 ` Felipe Balbi
[not found] ` <20110822142805.GT30398-UiBtZHVXSwEVvW8u9ZQWYwjfymiNCTlR@public.gmane.org>
2011-08-22 14:29 ` Felipe Balbi
2012-02-02 16:19 ` Jassi Brar
[not found] ` <CABb+yY3X0XDk0zByZZcJOO0h2Kxu14UD4w-GS7p1HPAAWU3SVA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-02-02 16:29 ` [PATCH 1/4] USB: Gadget: Rename audio function to uac1 Jassi Brar
2012-02-15 8:12 ` Felipe Balbi
2012-02-02 16:30 ` [PATCH 2/4] USB: UAC2: Add ACHeader and FormatType descriptor Jassi Brar
2012-02-02 16:31 ` Jassi Brar [this message]
2012-02-02 16:31 ` [PATCH 4/4] USB: Gadget: Add Audio Class 2.0 Driver Jassi Brar
2011-08-24 2:00 ` [PATCH 2/2] " Chen Peter-B29397
[not found] ` <35AB98346D25394A9354ED89C4D7658717FD0C-TcFNo7jSaXOLgTCmFNXF2K4g8xLGJsHaLnY5E4hWTkheoWH0uzbU5w@public.gmane.org>
2011-08-24 4:22 ` Jassi Brar
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=1328200272-32020-1-git-send-email-jaswinder.singh@linaro.org \
--to=jaswinder.singh-qsej5fyqhm4dnm+yrofe0a@public.gmane.org \
--cc=alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org \
--cc=balbi-l0cyMroinI0@public.gmane.org \
--cc=greg-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org \
--cc=jaredwiltshire-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=yadi.brar01-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=zonque-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
/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;
as well as URLs for NNTP newsgroup(s).