[PATCH 1/4] usb: gadget: u_uac1: fix build issue

From: Huang Rui
Date: Tue Jan 13 2015 - 01:37:41 EST


Since gaudio member is removed at f_uac1_opts, it also needs to remove the
cleanup call of gaudio member at f_uac1_opts when the usb function instance
is freed.

See below error message:
CC [M] drivers/gpu/drm/nouveau/core/subdev/vm/nv50.o
CC [M] drivers/staging/lustre/lnet/selftest/module.o
drivers/usb/gadget/function/f_uac1.c: In function âf_audio_free_instâ:
drivers/usb/gadget/function/f_uac1.c:904:21: error: âstruct f_uac1_optsâ has no member named âcardâ
gaudio_cleanup(opts->card);
^
make[4]: *** [drivers/usb/gadget/function/f_uac1.o] Error 1
make[3]: *** [drivers/usb/gadget/function] Error 2
make[2]: *** [drivers/usb/gadget] Error 2
make[2]: *** Waiting for unfinished jobs....
CC [M] drivers/staging/lustre/lnet/selftest/ping_test.o

Signed-off-by: Huang Rui <ray.huang@xxxxxxx>
Cc: Peter Chen <peter.chen@xxxxxxxxxxxxx>
---

Felipe,

As mentioned at previous mail, this fix is for your current testing/next
branch.

Thanks,
Rui

---

drivers/usb/gadget/function/f_uac1.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/function/f_uac1.c b/drivers/usb/gadget/function/f_uac1.c
index 9cf2252..3196e34 100644
--- a/drivers/usb/gadget/function/f_uac1.c
+++ b/drivers/usb/gadget/function/f_uac1.c
@@ -901,7 +901,7 @@ static void f_audio_free_inst(struct usb_function_instance *f)
struct f_uac1_opts *opts;

opts = container_of(f, struct f_uac1_opts, func_inst);
- gaudio_cleanup(opts->card);
+
if (opts->fn_play_alloc)
kfree(opts->fn_play);
if (opts->fn_cap_alloc)
--
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/