Commit 7d7db5d3 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

ASoC: soc-core: move soc_find_component()

move soc_find_component() next to snd_soc_is_matching_component().
This is prepare for soc_find_component() cleanup
Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent a2438253
...@@ -760,6 +760,25 @@ static struct device_node ...@@ -760,6 +760,25 @@ static struct device_node
return of_node; return of_node;
} }
static int snd_soc_is_matching_component(
const struct snd_soc_dai_link_component *dlc,
struct snd_soc_component *component)
{
struct device_node *component_of_node;
if (!dlc)
return 0;
component_of_node = soc_component_to_node(component);
if (dlc->of_node && component_of_node != dlc->of_node)
return 0;
if (dlc->name && strcmp(component->name, dlc->name))
return 0;
return 1;
}
static struct snd_soc_component *soc_find_component( static struct snd_soc_component *soc_find_component(
const struct device_node *of_node, const char *name) const struct device_node *of_node, const char *name)
{ {
...@@ -782,25 +801,6 @@ static struct snd_soc_component *soc_find_component( ...@@ -782,25 +801,6 @@ static struct snd_soc_component *soc_find_component(
return NULL; return NULL;
} }
static int snd_soc_is_matching_component(
const struct snd_soc_dai_link_component *dlc,
struct snd_soc_component *component)
{
struct device_node *component_of_node;
if (!dlc)
return 0;
component_of_node = soc_component_to_node(component);
if (dlc->of_node && component_of_node != dlc->of_node)
return 0;
if (dlc->name && strcmp(component->name, dlc->name))
return 0;
return 1;
}
/** /**
* snd_soc_find_dai - Find a registered DAI * snd_soc_find_dai - Find a registered DAI
* *
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment