usb: gadget: audio: Use container_of to free audio_dev
authorAndrzej Pietrasiewicz <andrzej.p@samsung.com>
Tue, 22 Jul 2014 17:58:29 +0000 (19:58 +0200)
committerFelipe Balbi <balbi@ti.com>
Wed, 20 Aug 2014 19:04:02 +0000 (14:04 -0500)
commit5d73abf2a77a090ca4c920ac99c8ec0e272398a9
tree82ffae555a615bc17063b9ad9cff4f9a5fc44fc6
parent8f90afd918886f10ac82aded9a30edfd80f2f69b
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>
drivers/usb/gadget/function/f_uac2.c
drivers/usb/gadget/legacy/audio.c