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>
diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c
index 6cb6db0..94a19f9 100644
--- a/sound/soc/sh/rcar/ssi.c
+++ b/sound/soc/sh/rcar/ssi.c
@@ -698,7 +698,10 @@
int irq = ssi->irq;
/* PIO will request IRQ again */
- devm_free_irq(dev, irq, mod);
+ if (ssi->dma)
+ devm_free_irq(dev, irq, mod);
+
+ rsnd_dma_detach(mod, &ssi->dma);
return 0;
}