summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-core.c
diff options
context:
space:
mode:
authorKuninori Morimoto2019-06-20 02:49:33 +0200
committerMark Brown2019-06-24 18:24:03 +0200
commitb9f2e25c599bbbf0646957e07ebb72b942c286cc (patch)
tree4e3263bff0e8f16542a438ed821eaf0423fdbaf6 /sound/soc/soc-core.c
parentASoC: soc-core: soc_find_component() uses snd_soc_dai_link_component (diff)
downloadkernel-qcow2-linux-b9f2e25c599bbbf0646957e07ebb72b942c286cc.tar.gz
kernel-qcow2-linux-b9f2e25c599bbbf0646957e07ebb72b942c286cc.tar.xz
kernel-qcow2-linux-b9f2e25c599bbbf0646957e07ebb72b942c286cc.zip
ASoC: soc-core: use soc_find_component() at snd_soc_find_dai()
snd_soc_find_dai() finds component first via specified snd_soc_dai_link_component, and find DAI from it. We already have soc_find_component() to find component, but soc_find_dai() has original implementation to find component. We shouldn't have duplicate implementation to do same things. This patch uses soc_find_component() at soc_find_dai() Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r--sound/soc/soc-core.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 1749f4af91b6..358f1fbf9a30 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -813,9 +813,8 @@ struct snd_soc_dai *snd_soc_find_dai(
lockdep_assert_held(&client_mutex);
/* Find CPU DAI from registered DAIs */
- for_each_component(component) {
- if (!snd_soc_is_matching_component(dlc, component))
- continue;
+ component = soc_find_component(dlc);
+ if (component) {
for_each_component_dais(component, dai) {
if (dlc->dai_name && strcmp(dai->name, dlc->dai_name)
&& (!dai->driver->name