diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2016-10-19 05:56:26 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-10-24 19:23:29 +0200 |
commit | 0af5c01a79ade438698af683511803fc11291360 (patch) | |
tree | cb84539c599004d98c0ec2a0418c86f3a207a17b /sound/soc/sh/rcar/core.c | |
parent | ASoC: rsnd: remove duplicate define of rsnd_dvc_of_node() (diff) | |
download | linux-0af5c01a79ade438698af683511803fc11291360.tar.xz linux-0af5c01a79ade438698af683511803fc11291360.zip |
ASoC: rsnd: amend .probe/.remove call for DPCM
commit 1a5658c2131 ("ASoC: rsnd: count .probe/.remove for
rsnd_mod_call()") solved multi-resource-free issue, by putting
.probe/.remove under count control. But,it breaks sound mixing case
(if it was used under DPCM). In such case, it uses MIXn/DVCn/SSIn,
and these should be always probed.
This patch reverted above patch, and solved the same issue by
modifing _rsnd_kctrl_remove() function.
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/core.c')
-rw-r--r-- | sound/soc/sh/rcar/core.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c index f18141098b50..209e7363bfdd 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c @@ -993,7 +993,11 @@ static int __rsnd_kctrl_new(struct rsnd_mod *mod, void _rsnd_kctrl_remove(struct rsnd_kctrl_cfg *cfg) { - snd_ctl_remove(cfg->card, cfg->kctrl); + if (cfg->card && cfg->kctrl) + snd_ctl_remove(cfg->card, cfg->kctrl); + + cfg->card = NULL; + cfg->kctrl = NULL; } int rsnd_kctrl_new_m(struct rsnd_mod *mod, |