Merge branch 'next/drivers' into HEAD
[deliverable/linux.git] / drivers / usb / gadget / audio.c
index 8857b6eeb6a2ed3f69cb38cd1f0915db91b809b6..231b0efe8fdc12704f596e84c7fbab8f86e9aee7 100644 (file)
 /* #define VERBOSE_DEBUG */
 
 #include <linux/kernel.h>
-#include <linux/utsname.h>
+#include <linux/module.h>
 #include <linux/usb/composite.h>
 
 #include "gadget_chips.h"
 #define DRIVER_DESC            "Linux USB Audio Gadget"
 #define DRIVER_VERSION         "Feb 2, 2012"
 
-/*-------------------------------------------------------------------------*/
-
-/*
- * Kbuild is not very cooperative with respect to linking separately
- * compiled library objects into one module.  So for now we won't use
- * separate compilation ... ensuring init/exit sections work to shrink
- * the runtime footprint, and giving us at least some parts of what
- * a "gcc --combine ... part1.c part2.c part3.c ... " build would.
- */
-#include "composite.c"
 USB_GADGET_COMPOSITE_OPTIONS();
 
 /* string IDs are assigned dynamically */
 
-static char manufacturer[50];
-
 static struct usb_string strings_dev[] = {
-       [USB_GADGET_MANUFACTURER_IDX].s = manufacturer,
+       [USB_GADGET_MANUFACTURER_IDX].s = "",
        [USB_GADGET_PRODUCT_IDX].s = DRIVER_DESC,
        [USB_GADGET_SERIAL_IDX].s = "",
        {  } /* end of list */
@@ -147,24 +135,8 @@ static struct usb_configuration audio_config_driver = {
 
 static int __init audio_bind(struct usb_composite_dev *cdev)
 {
-       int                     gcnum;
        int                     status;
 
-       gcnum = usb_gadget_controller_number(cdev->gadget);
-       if (gcnum >= 0)
-               device_desc.bcdDevice = cpu_to_le16(0x0300 | gcnum);
-       else {
-               ERROR(cdev, "controller '%s' not recognized; trying %s\n",
-                       cdev->gadget->name,
-                       audio_config_driver.label);
-               device_desc.bcdDevice =
-                       __constant_cpu_to_le16(0x0300 | 0x0099);
-       }
-
-       /* device descriptor strings: manufacturer, product */
-       snprintf(manufacturer, sizeof manufacturer, "%s %s with %s",
-               init_utsname()->sysname, init_utsname()->release,
-               cdev->gadget->name);
        status = usb_string_ids_tab(cdev, strings_dev);
        if (status < 0)
                goto fail;
This page took 0.024652 seconds and 5 git commands to generate.