ASoC: soc-core: move soc_find_component()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Thu, 20 Jun 2019 00:49:17 +0000 (09:49 +0900)
committerMark Brown <broonie@kernel.org>
Mon, 24 Jun 2019 16:22:53 +0000 (17:22 +0100)
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>
sound/soc/soc-core.c

index 4cd77cd6c864a0e7b848b9170db392ec0c56f9b5..1b94119cfb0d0da6d79bc95a97e7e86aa44ab0d5 100644 (file)
@@ -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
  *