From 5d73abf2a77a090ca4c920ac99c8ec0e272398a9 Mon Sep 17 00:00:00 2001 From: Andrzej Pietrasiewicz Date: Tue, 22 Jul 2014 19:58:29 +0200 Subject: 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 Signed-off-by: Andrzej Pietrasiewicz Signed-off-by: Felipe Balbi --- drivers/usb/gadget/legacy/audio.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'drivers/usb/gadget/legacy/audio.c') 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 }; /*-------------------------------------------------------------------------*/ -- cgit