aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJassi Brar <jaswinder.singh@linaro.org>2012-02-02 11:31:12 -0500
committerFelipe Balbi <balbi@ti.com>2012-02-15 03:10:25 -0500
commitd747a916872241daef68c864ef09f8bef0c35bf8 (patch)
tree39106b6ea77fd7d2e954eccfe6ee13da705ee5e7
parent0d4e1b2a7eb7f4db8b3dc1c7ef4b507040f87ded (diff)
usb: gadget: audio: Move string IDs to audio.c
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@gmail.com> Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
-rw-r--r--drivers/usb/gadget/audio.c23
-rw-r--r--drivers/usb/gadget/f_uac1.c23
2 files changed, 23 insertions, 23 deletions
diff --git a/drivers/usb/gadget/audio.c b/drivers/usb/gadget/audio.c
index 056a2d936d7f..33e9327d6639 100644
--- a/drivers/usb/gadget/audio.c
+++ b/drivers/usb/gadget/audio.c
@@ -33,6 +33,29 @@
33#include "config.c" 33#include "config.c"
34#include "epautoconf.c" 34#include "epautoconf.c"
35 35
36/* string IDs are assigned dynamically */
37
38#define STRING_MANUFACTURER_IDX 0
39#define STRING_PRODUCT_IDX 1
40
41static char manufacturer[50];
42
43static struct usb_string strings_dev[] = {
44 [STRING_MANUFACTURER_IDX].s = manufacturer,
45 [STRING_PRODUCT_IDX].s = DRIVER_DESC,
46 { } /* end of list */
47};
48
49static struct usb_gadget_strings stringtab_dev = {
50 .language = 0x0409, /* en-us */
51 .strings = strings_dev,
52};
53
54static struct usb_gadget_strings *audio_strings[] = {
55 &stringtab_dev,
56 NULL,
57};
58
36#include "u_uac1.c" 59#include "u_uac1.c"
37#include "f_uac1.c" 60#include "f_uac1.c"
38 61
diff --git a/drivers/usb/gadget/f_uac1.c b/drivers/usb/gadget/f_uac1.c
index e4c060fd81e4..1a5dcd5565e3 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 = {
216 NULL, 216 NULL,
217}; 217};
218 218
219/* string IDs are assigned dynamically */
220
221#define STRING_MANUFACTURER_IDX 0
222#define STRING_PRODUCT_IDX 1
223
224static char manufacturer[50];
225
226static struct usb_string strings_dev[] = {
227 [STRING_MANUFACTURER_IDX].s = manufacturer,
228 [STRING_PRODUCT_IDX].s = DRIVER_DESC,
229 { } /* end of list */
230};
231
232static struct usb_gadget_strings stringtab_dev = {
233 .language = 0x0409, /* en-us */
234 .strings = strings_dev,
235};
236
237static struct usb_gadget_strings *audio_strings[] = {
238 &stringtab_dev,
239 NULL,
240};
241
242/* 219/*
243 * This function is an ALSA sound card following USB Audio Class Spec 1.0. 220 * This function is an ALSA sound card following USB Audio Class Spec 1.0.
244 */ 221 */