diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2019-06-20 02:49:17 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-06-24 18:22:53 +0200 |
commit | 7d7db5d3c3d849c2f877be3b4c9afa7f5b5257c2 (patch) | |
tree | 3b63e7224ae5d9b953575c28b04409f837388ecb /sound | |
parent | ASoC: SOF: Intel: hda: remove duplicated include from hda.c (diff) | |
download | linux-7d7db5d3c3d849c2f877be3b4c9afa7f5b5257c2.tar.xz linux-7d7db5d3c3d849c2f877be3b4c9afa7f5b5257c2.zip |
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: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/soc-core.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 4cd77cd6c864..1b94119cfb0d 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -760,6 +760,25 @@ static struct device_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( const struct device_node *of_node, const char *name) { @@ -782,25 +801,6 @@ static struct snd_soc_component *soc_find_component( 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 * |