alsa-devel.alsa-project.org archive mirror
 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>,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Subject: [alsa-devel] [PATCH 10/21] ASoC: soc-core: move snd_soc_lookup_component()
Date: 09 Oct 2019 13:30:33 +0900	[thread overview]
Message-ID: <87eezmilqu.wl-kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <87sgo2ilso.wl-kuninori.morimoto.gx@renesas.com>


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

This patch moves snd_soc_lookup_component() to upper side.
This is prepare for snd_soc_unregister_component()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/soc-core.c | 52 ++++++++++++++++++++++++++--------------------------
 1 file changed, 26 insertions(+), 26 deletions(-)

diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index fa837c0..72eb59c 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -356,6 +356,32 @@ struct snd_soc_component *snd_soc_rtdcom_lookup(struct snd_soc_pcm_runtime *rtd,
 }
 EXPORT_SYMBOL_GPL(snd_soc_rtdcom_lookup);
 
+struct snd_soc_component *snd_soc_lookup_component(struct device *dev,
+						   const char *driver_name)
+{
+	struct snd_soc_component *component;
+	struct snd_soc_component *ret;
+
+	ret = NULL;
+	mutex_lock(&client_mutex);
+	for_each_component(component) {
+		if (dev != component->dev)
+			continue;
+
+		if (driver_name &&
+		    (driver_name != component->driver->name) &&
+		    (strcmp(component->driver->name, driver_name) != 0))
+			continue;
+
+		ret = component;
+		break;
+	}
+	mutex_unlock(&client_mutex);
+
+	return ret;
+}
+EXPORT_SYMBOL_GPL(snd_soc_lookup_component);
+
 struct snd_pcm_substream *snd_soc_get_dai_substream(struct snd_soc_card *card,
 		const char *dai_link, int stream)
 {
@@ -2889,32 +2915,6 @@ void snd_soc_unregister_component(struct device *dev)
 }
 EXPORT_SYMBOL_GPL(snd_soc_unregister_component);
 
-struct snd_soc_component *snd_soc_lookup_component(struct device *dev,
-						   const char *driver_name)
-{
-	struct snd_soc_component *component;
-	struct snd_soc_component *ret;
-
-	ret = NULL;
-	mutex_lock(&client_mutex);
-	for_each_component(component) {
-		if (dev != component->dev)
-			continue;
-
-		if (driver_name &&
-		    (driver_name != component->driver->name) &&
-		    (strcmp(component->driver->name, driver_name) != 0))
-			continue;
-
-		ret = component;
-		break;
-	}
-	mutex_unlock(&client_mutex);
-
-	return ret;
-}
-EXPORT_SYMBOL_GPL(snd_soc_lookup_component);
-
 /* Retrieve a card's name from device tree */
 int snd_soc_of_parse_card_name(struct snd_soc_card *card,
 			       const char *propname)
-- 
2.7.4

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  parent reply	other threads:[~2019-10-09  4:37 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-09  4:29 [alsa-devel] [PATCH 00/21] ASoC: soc-core cleanup - step 4 Kuninori Morimoto
2019-10-09  4:29 ` [alsa-devel] [PATCH 01/21] ASoC: soc-core: remove for_each_rtdcom_safe() Kuninori Morimoto
2019-10-09  4:29 ` [alsa-devel] [PATCH 02/21] ASoC: soc-core: add for_each_rtd_components() and replace Kuninori Morimoto
2019-10-09  4:30 ` [alsa-devel] [PATCH 03/21] ASoC: soc-core: move soc_init_dai_link() Kuninori Morimoto
2019-10-09  4:30 ` [alsa-devel] [PATCH 04/21] ASoC: soc-core: rename soc_init_dai_link() to soc_dai_link_sanity_check() Kuninori Morimoto
2019-10-10 14:17   ` Pierre-Louis Bossart
2019-10-11  1:19     ` Kuninori Morimoto
2019-10-11 13:38       ` Pierre-Louis Bossart
2019-10-09  4:30 ` [alsa-devel] [PATCH 05/21] ASoC: soc-core: remove duplicated soc_is_dai_link_bound() Kuninori Morimoto
2019-10-10 15:09   ` Pierre-Louis Bossart
2019-10-09  4:30 ` [alsa-devel] [PATCH 06/21] ASoC: soc-core: call soc_bind_dai_link() under snd_soc_add_dai_link() Kuninori Morimoto
2019-10-09  4:30 ` [alsa-devel] [PATCH 07/21] ASoC: soc-core: add soc_unbind_dai_link() Kuninori Morimoto
2019-10-09  4:30 ` [alsa-devel] [PATCH 08/21] ASoC: soc-core: snd_soc_unbind_card() cleanup Kuninori Morimoto
2019-10-09  4:30 ` [alsa-devel] [PATCH 09/21] ASoC: soc-core: remove unneeded snd_soc_tplg_component_remove() Kuninori Morimoto
2019-10-10 15:09   ` Pierre-Louis Bossart
2019-10-11  1:30     ` Kuninori Morimoto
2019-10-11 13:40       ` Pierre-Louis Bossart
2019-10-09  4:30 ` Kuninori Morimoto [this message]
2019-10-09  4:30 ` [alsa-devel] [PATCH 11/21] ASoC: soc-core: add snd_soc_del_component() Kuninori Morimoto
2019-10-10 15:16   ` Pierre-Louis Bossart
2019-10-11  1:35     ` Kuninori Morimoto
2019-10-09  4:30 ` [alsa-devel] [PATCH 12/21] ASoC: soc-core: use snd_soc_lookup_component() at snd_soc_unregister_component() Kuninori Morimoto
2019-10-10 15:19   ` Pierre-Louis Bossart
2019-10-11  1:38     ` Kuninori Morimoto
2019-10-09  4:30 ` [alsa-devel] [PATCH 13/21] ASoC: soc-core: move snd_soc_register_dai() Kuninori Morimoto
2019-10-09  4:30 ` [alsa-devel] [PATCH 14/21] ASoC: soc-core: have legacy_dai_naming at snd_soc_register_dai() Kuninori Morimoto
2019-10-10 15:26   ` Pierre-Louis Bossart
2019-10-11  1:07     ` Kuninori Morimoto
2019-10-11 13:43       ` Pierre-Louis Bossart
2019-10-09  4:30 ` [alsa-devel] [PATCH 15/21] ASoC: soc-core: move snd_soc_unregister_dais() Kuninori Morimoto
2019-10-09  4:31 ` [alsa-devel] [PATCH 16/21] ASoC: soc-core: add snd_soc_unregister_dai() Kuninori Morimoto
2019-10-09  4:31 ` [alsa-devel] [PATCH 17/21] ASoC: soc-core: don't call snd_soc_dapm_new_dai_widgets() at snd_soc_register_dai() Kuninori Morimoto
2019-10-09  4:31 ` [alsa-devel] [PATCH 18/21] ASoC: soc-core: use mutex_lock() at snd_soc_add_component() Kuninori Morimoto
2019-10-10 15:29   ` Pierre-Louis Bossart
2019-10-09  4:31 ` [alsa-devel] [PATCH 19/21] ASoC: soc-core: call snd_soc_register_dai() from snd_soc_register_dais() Kuninori Morimoto
2019-10-10 15:34   ` Pierre-Louis Bossart
2019-10-11  1:44     ` Kuninori Morimoto
2019-10-09  4:31 ` [alsa-devel] [PATCH 20/21] ASoC: soc-core: remove topology specific operation Kuninori Morimoto
2019-10-09  4:31 ` [alsa-devel] [PATCH 21/21] ASoC: soc.h: dobj is used only when SND_SOC_TOPOLOGY Kuninori Morimoto
2019-10-09 14:16 ` [alsa-devel] [PATCH 00/21] ASoC: soc-core cleanup - step 4 Pierre-Louis Bossart
2019-10-10 15:38 ` Pierre-Louis Bossart
2019-10-11  1:53   ` Kuninori Morimoto

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=87eezmilqu.wl-kuninori.morimoto.gx@renesas.com \
    --to=kuninori.morimoto.gx@renesas.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=pierre-louis.bossart@linux.intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).