ASoC: rsnd: call snd_soc_disconnect_sync() when remove
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Mon, 6 Nov 2017 08:41:37 +0000 (08:41 +0000)
committerMark Brown <broonie@kernel.org>
Tue, 28 Nov 2017 16:20:49 +0000 (16:20 +0000)
commit180d9ef58104dfae78622d01910b9b7756701134
tree97f0955d62478aa3dfe73b17456ee3984c3298f2
parent69830d3909849dee33b9a2de88ece3d59c75a1b8
ASoC: rsnd: call snd_soc_disconnect_sync() when remove

Renesas R-Car sound driver should be stopped if unbinded during
playbacking/capturing. Otherwise clock open/close counter mismatch
happen.

One note is that we can't skip from remove function (= return -Exxx)
in such case if user used unbind. Because unbind function doesn't
check return value from each driver's remove function.
This means we must to stop and remove driver in remove function.

Now ASoC has snd_soc_disconnect_sync() for this purpose.
Let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sh/rcar/core.c