summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-dai.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2019-07-22 03:34:56 +0200
committerMark Brown <broonie@kernel.org>2019-07-23 19:14:23 +0200
commitcfd9b5fbfe1e8763018aea2600aa0d6ff015ebfc (patch)
tree8443edc9b30689e87fa8d9cfbff2d5a103094ff8 /sound/soc/soc-dai.c
parentASoC: soc-dai: add snd_soc_dai_resume() (diff)
downloadlinux-cfd9b5fbfe1e8763018aea2600aa0d6ff015ebfc.tar.xz
linux-cfd9b5fbfe1e8763018aea2600aa0d6ff015ebfc.zip
ASoC: soc-dai: add snd_soc_dai_probe()
Current ALSA SoC is directly using dai->driver->xxx, thus, it has deep nested bracket, and it makes code unreadable. This patch adds new snd_soc_dai_probe() and use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87k1cahn26.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-dai.c')
-rw-r--r--sound/soc/soc-dai.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/soc/soc-dai.c b/sound/soc/soc-dai.c
index ddb6f217c0ed..55c1fac99613 100644
--- a/sound/soc/soc-dai.c
+++ b/sound/soc/soc-dai.c
@@ -365,3 +365,10 @@ void snd_soc_dai_resume(struct snd_soc_dai *dai)
if (dai->driver->resume)
dai->driver->resume(dai);
}
+
+int snd_soc_dai_probe(struct snd_soc_dai *dai)
+{
+ if (dai->driver->probe)
+ return dai->driver->probe(dai);
+ return 0;
+}