Loading sound/soc/soc-core.c +24 −6 Original line number Diff line number Diff line Loading @@ -878,6 +878,7 @@ struct snd_soc_component *soc_find_component( const struct device_node *of_node, const char *name) { struct snd_soc_component *component; bool found = false; if (!of_node && !name) { pr_err("%s: Either of_node or name must be valid\n", Loading @@ -885,15 +886,24 @@ struct snd_soc_component *soc_find_component( return NULL; } mutex_lock(&client_mutex); list_for_each_entry(component, &component_list, list) { if (of_node) { if (component->dev->of_node == of_node) return component; if (component->dev->of_node == of_node) { found = true; goto exit; } } else if (strcmp(component->name, name) == 0) { return component; found = true; goto exit; } } exit: mutex_unlock(&client_mutex); if (found) return component; else return NULL; } EXPORT_SYMBOL(soc_find_component); Loading @@ -903,7 +913,9 @@ static struct snd_soc_dai *snd_soc_find_dai( { struct snd_soc_component *component; struct snd_soc_dai *dai; bool found = false; mutex_lock(&client_mutex); /* Find CPU DAI from registered DAIs*/ list_for_each_entry(component, &component_list, list) { if (dlc->of_node && component->dev->of_node != dlc->of_node) Loading @@ -914,10 +926,16 @@ static struct snd_soc_dai *snd_soc_find_dai( if (dlc->dai_name && strcmp(dai->name, dlc->dai_name)) continue; return dai; found = true; goto exit; } } exit: mutex_unlock(&client_mutex); if (found) return dai; else return NULL; } Loading Loading
sound/soc/soc-core.c +24 −6 Original line number Diff line number Diff line Loading @@ -878,6 +878,7 @@ struct snd_soc_component *soc_find_component( const struct device_node *of_node, const char *name) { struct snd_soc_component *component; bool found = false; if (!of_node && !name) { pr_err("%s: Either of_node or name must be valid\n", Loading @@ -885,15 +886,24 @@ struct snd_soc_component *soc_find_component( return NULL; } mutex_lock(&client_mutex); list_for_each_entry(component, &component_list, list) { if (of_node) { if (component->dev->of_node == of_node) return component; if (component->dev->of_node == of_node) { found = true; goto exit; } } else if (strcmp(component->name, name) == 0) { return component; found = true; goto exit; } } exit: mutex_unlock(&client_mutex); if (found) return component; else return NULL; } EXPORT_SYMBOL(soc_find_component); Loading @@ -903,7 +913,9 @@ static struct snd_soc_dai *snd_soc_find_dai( { struct snd_soc_component *component; struct snd_soc_dai *dai; bool found = false; mutex_lock(&client_mutex); /* Find CPU DAI from registered DAIs*/ list_for_each_entry(component, &component_list, list) { if (dlc->of_node && component->dev->of_node != dlc->of_node) Loading @@ -914,10 +926,16 @@ static struct snd_soc_dai *snd_soc_find_dai( if (dlc->dai_name && strcmp(dai->name, dlc->dai_name)) continue; return dai; found = true; goto exit; } } exit: mutex_unlock(&client_mutex); if (found) return dai; else return NULL; } Loading