OSDN Git Service

usb: gadget: audio: Move string IDs to audio.c
authorJassi Brar <jaswinder.singh@linaro.org>
Thu, 2 Feb 2012 16:31:12 +0000 (22:01 +0530)
committerFelipe Balbi <balbi@ti.com>
Wed, 15 Feb 2012 08:10:25 +0000 (10:10 +0200)
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>
drivers/usb/gadget/audio.c
drivers/usb/gadget/f_uac1.c

index 056a2d9..33e9327 100644 (file)
 #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"
 
index e4c060f..1a5dcd5 100644 (file)
@@ -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,
-};
-
 /*
  * This function is an ALSA sound card following USB Audio Class Spec 1.0.
  */