diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2015-02-02 04:53:53 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-02-02 18:37:56 +0000 |
commit | d1f83d6ef43bf1b4a3d19805098b3a9724047479 (patch) | |
tree | d128fc580e3644c40eed162a98a0e7c6cdfccb68 /sound/soc/sh/rcar/dvc.c | |
parent | 8048b91ffca872d704b7e7fb404a121955ce8d8e (diff) | |
download | op-kernel-dev-d1f83d6ef43bf1b4a3d19805098b3a9724047479.zip op-kernel-dev-d1f83d6ef43bf1b4a3d19805098b3a9724047479.tar.gz |
ASoC: rsnd: call missing snd_ctl_remove()
Current Renesas R-Car sound driver is using snd_ctl_xxx()
functions, but it didn't call snd_ctl free_one() / snd_ctl_remove().
This patch call these functions.
Reported-by: Nguyen Viet Dung <nv-dung@jinso.co.jp>
Reported-by: Bui Duc Phuc <bd-phuc@jinso.co.jp>
Reported-by: Cao Minh Hiep <cm-hiep@jinso.co.jp>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sh/rcar/dvc.c')
-rw-r--r-- | sound/soc/sh/rcar/dvc.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sound/soc/sh/rcar/dvc.c b/sound/soc/sh/rcar/dvc.c index 38a5f33..d7f9ed9 100644 --- a/sound/soc/sh/rcar/dvc.c +++ b/sound/soc/sh/rcar/dvc.c @@ -127,6 +127,20 @@ static int rsnd_dvc_probe_gen2(struct rsnd_mod *mod, return 0; } +static int rsnd_dvc_remove_gen2(struct rsnd_mod *mod, + struct rsnd_priv *priv) +{ + struct rsnd_dvc *dvc = rsnd_mod_to_dvc(mod); + + rsnd_kctrl_remove(dvc->volume); + rsnd_kctrl_remove(dvc->mute); + rsnd_kctrl_remove(dvc->ren); + rsnd_kctrl_remove(dvc->rup); + rsnd_kctrl_remove(dvc->rdown); + + return 0; +} + static int rsnd_dvc_init(struct rsnd_mod *dvc_mod, struct rsnd_priv *priv) { @@ -258,6 +272,7 @@ static int rsnd_dvc_pcm_new(struct rsnd_mod *mod, static struct rsnd_mod_ops rsnd_dvc_ops = { .name = DVC_NAME, .probe = rsnd_dvc_probe_gen2, + .remove = rsnd_dvc_remove_gen2, .init = rsnd_dvc_init, .quit = rsnd_dvc_quit, .start = rsnd_dvc_start, |