summaryrefslogtreecommitdiffstats
path: root/sound/soc/sh
diff options
context:
space:
mode:
authorKuninori Morimoto2017-11-06 09:41:37 +0100
committerMark Brown2017-11-28 17:20:49 +0100
commit180d9ef58104dfae78622d01910b9b7756701134 (patch)
tree97f0955d62478aa3dfe73b17456ee3984c3298f2 /sound/soc/sh
parentMerge branch 'topic/disconnect' of https://git.kernel.org/pub/scm/linux/kerne... (diff)
downloadkernel-qcow2-linux-180d9ef58104dfae78622d01910b9b7756701134.tar.gz
kernel-qcow2-linux-180d9ef58104dfae78622d01910b9b7756701134.tar.xz
kernel-qcow2-linux-180d9ef58104dfae78622d01910b9b7756701134.zip
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>
Diffstat (limited to 'sound/soc/sh')
-rw-r--r--sound/soc/sh/rcar/core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
index f12a88a21dfa..bd64dc6ec1c3 100644
--- a/sound/soc/sh/rcar/core.c
+++ b/sound/soc/sh/rcar/core.c
@@ -1496,6 +1496,8 @@ static int rsnd_remove(struct platform_device *pdev)
};
int ret = 0, i;
+ snd_soc_disconnect_sync(&pdev->dev);
+
pm_runtime_disable(&pdev->dev);
for_each_rsnd_dai(rdai, priv, i) {