summaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/soc-core.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 358f1fbf9a30..8ccaf63e428c 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -786,6 +786,14 @@ static struct snd_soc_component *soc_find_component(
lockdep_assert_held(&client_mutex);
+ /*
+ * NOTE
+ *
+ * It returns *1st* found component, but some driver
+ * has few components by same of_node/name
+ * ex)
+ * CPU component and generic DMAEngine component
+ */
for_each_component(component)
if (snd_soc_is_matching_component(dlc, component))
return component;
@@ -813,8 +821,9 @@ struct snd_soc_dai *snd_soc_find_dai(
lockdep_assert_held(&client_mutex);
/* Find CPU DAI from registered DAIs */
- component = soc_find_component(dlc);
- if (component) {
+ for_each_component(component) {
+ if (!snd_soc_is_matching_component(dlc, component))
+ continue;
for_each_component_dais(component, dai) {
if (dlc->dai_name && strcmp(dai->name, dlc->dai_name)
&& (!dai->driver->name
OpenPOWER on IntegriCloud