usb: gadget: audio: actually support both speeds
authorFelipe Balbi <balbi@ti.com>
Fri, 26 Aug 2011 09:48:15 +0000 (12:48 +0300)
committerFelipe Balbi <balbi@ti.com>
Fri, 9 Sep 2011 10:06:05 +0000 (13:06 +0300)
While testing g_audio with HighSpeed UDC on a
FS Hub, we had no configurations to present to
the host. That's because both speeds where
mutually exclusive.

Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/f_audio.c

index a9a4eade7e80aab6902b037c77ec3a17c0895445..ddeaa45cd886fa056daff623baae1d4f0f0ecdc4 100644 (file)
@@ -681,17 +681,18 @@ f_audio_bind(struct usb_configuration *c, struct usb_function *f)
 
        status = -ENOMEM;
 
-       /* supcard all relevant hardware speeds... we expect that when
+       /* copy descriptors, and track endpoint copies */
+       f->descriptors = usb_copy_descriptors(f_audio_desc);
+
+       /*
+        * support all relevant hardware speeds... we expect that when
         * hardware is dual speed, all bulk-capable endpoints work at
         * both speeds
         */
-
-       /* copy descriptors, and track endpoint copies */
        if (gadget_is_dualspeed(c->cdev->gadget)) {
                c->highspeed = true;
                f->hs_descriptors = usb_copy_descriptors(f_audio_desc);
-       } else
-               f->descriptors = usb_copy_descriptors(f_audio_desc);
+       }
 
        return 0;