All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: Mark Brown <broonie@kernel.org>
Cc: Linux-ALSA <alsa-devel@alsa-project.org>
Subject: [PATCH 1/4] ASoC: soc-core: move soc_find_component()
Date: 20 Jun 2019 09:49:17 +0900	[thread overview]
Message-ID: <87sgs5rsl2.wl-kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <87tvclrslu.wl-kuninori.morimoto.gx@renesas.com>


From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

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>
---
 sound/soc/soc-core.c | 38 +++++++++++++++++++-------------------
 1 file changed, 19 insertions(+), 19 deletions(-)

diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 4cd77cd..1b94119 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
  *
-- 
2.7.4

  reply	other threads:[~2019-06-20  0:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-20  0:48 [PATCH 0/4] ASoC: soc-core: tidyup with soc_find_component() Kuninori Morimoto
2019-06-20  0:49 ` Kuninori Morimoto [this message]
2019-06-24 16:32   ` Applied "ASoC: soc-core: move soc_find_component()" to the asoc tree Mark Brown
2019-06-20  0:49 ` [PATCH 2/4] ASoC: soc-core: soc_find_component() uses snd_soc_is_matching_component() Kuninori Morimoto
2019-06-24 16:32   ` Applied "ASoC: soc-core: soc_find_component() uses snd_soc_is_matching_component()" to the asoc tree Mark Brown
2019-06-20  0:49 ` [PATCH 3/4] ASoC: soc-core: soc_find_component() uses snd_soc_dai_link_component Kuninori Morimoto
2019-06-24 16:32   ` Applied "ASoC: soc-core: soc_find_component() uses snd_soc_dai_link_component" to the asoc tree Mark Brown
2019-06-20  0:49 ` [PATCH 4/4] ASoC: soc-core: use soc_find_component() at snd_soc_find_dai() Kuninori Morimoto
2019-06-24 16:32   ` Applied "ASoC: soc-core: use soc_find_component() at snd_soc_find_dai()" to the asoc tree Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sgs5rsl2.wl-kuninori.morimoto.gx@renesas.com \
    --to=kuninori.morimoto.gx@renesas.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.