summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/legacy/audio.c
diff options
context:
space:
mode:
authorAndrzej Pietrasiewicz <andrzej.p@samsung.com>2014-07-22 19:58:29 +0200
committerFelipe Balbi <balbi@ti.com>2014-08-20 14:04:02 -0500
commit5d73abf2a77a090ca4c920ac99c8ec0e272398a9 (patch)
tree82ffae555a615bc17063b9ad9cff4f9a5fc44fc6 /drivers/usb/gadget/legacy/audio.c
parent8f90afd918886f10ac82aded9a30edfd80f2f69b (diff)
usb: gadget: audio: Use container_of to free audio_dev
Eliminate static struct *agdev_g from f_uac2.c. It is used for freeing its memory, but the same address can be found by calling container_of in afunc_unbind(). This implies eliminating uac2_unbind_config(). The audio_config_driver in audio.c does not have its unbind method any more. It has been used only when uac2 is used, so uac2 itself can handle unbinding in afunc_unbind(). Tested-by: Sebastian Reimers <sebastian.reimers@googlemail.com> Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/legacy/audio.c')
-rw-r--r--drivers/usb/gadget/legacy/audio.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/usb/gadget/legacy/audio.c b/drivers/usb/gadget/legacy/audio.c
index 6eb695e5e43a..3c2328316c05 100644
--- a/drivers/usb/gadget/legacy/audio.c
+++ b/drivers/usb/gadget/legacy/audio.c
@@ -126,9 +126,6 @@ static struct usb_configuration audio_config_driver = {
.bConfigurationValue = 1,
/* .iConfiguration = DYNAMIC */
.bmAttributes = USB_CONFIG_ATT_SELFPOWER,
-#ifndef CONFIG_GADGET_UAC1
- .unbind = uac2_unbind_config,
-#endif
};
/*-------------------------------------------------------------------------*/