Bug in USB audio gadget driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I seem to have found a bug in the USB audio gadget driver
(drivers/usb/gadget/f_audio). When running the audio gadget module on
an omap3-based device it was crashing when plugged into the USB host.

This is seemingly because as_out_ep_desc, which is marked as
__initdata, is referenced at gadget enumeration time in the function
f_audio_set_alt, under the guise of the audio gadget's 'out_desc'
member.

I was able to fix this with the trivial patch below, although I'm not
intimately familiar with the code, so perhaps there's a more elegant
way to do this.

Best regards,

Martin Jackson



--- a/f_audio.c	2011-05-16 12:03:15.027391360 +0200
+++ b/f_audio.c	2011-05-16 12:04:43.787141989 +0200
@@ -177,7 +177,7 @@
 };

 /* Standard ISO OUT Endpoint Descriptor */
-static struct usb_endpoint_descriptor as_out_ep_desc __initdata = {
+static struct usb_endpoint_descriptor as_out_ep_desc  = {
 	.bLength =		USB_DT_ENDPOINT_AUDIO_SIZE,
 	.bDescriptorType =	USB_DT_ENDPOINT,
 	.bEndpointAddress =	USB_DIR_OUT,
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux