[alsa-devel] [PATCH v2 04/15] ASoC: soc-core: move snd_soc_get_pcm_runtime()

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Mon Nov 25 01:43:58 CET 2019


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

This patch moves snd_soc_get_pcm_runtime() next to
snd_soc_get_dai_substream().
This is prepare for snd_soc_get_pcm_runtime() cleanup.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan at linux.intel.com>
---
v1 -> v2
	- remove unneeded white-line
	- fixup git-log explanation

 sound/soc/soc-core.c | 29 +++++++++++++++--------------
 1 file changed, 15 insertions(+), 14 deletions(-)

diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index d6118cf..0081b65 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -391,6 +391,21 @@ EXPORT_SYMBOL_GPL(snd_soc_lookup_component);
 
 static const struct snd_soc_ops null_snd_soc_ops;
 
+struct snd_soc_pcm_runtime
+*snd_soc_get_pcm_runtime(struct snd_soc_card *card,
+			 const char *dai_link)
+{
+	struct snd_soc_pcm_runtime *rtd;
+
+	for_each_card_rtds(card, rtd) {
+		if (!strcmp(rtd->dai_link->name, dai_link))
+			return rtd;
+	}
+	dev_dbg(card->dev, "ASoC: failed to find rtd %s\n", dai_link);
+	return NULL;
+}
+EXPORT_SYMBOL_GPL(snd_soc_get_pcm_runtime);
+
 static void soc_release_rtd_dev(struct device *dev)
 {
 	/* "dev" means "rtd->dev" */
@@ -491,20 +506,6 @@ static struct snd_soc_pcm_runtime *soc_new_pcm_runtime(
 	return NULL;
 }
 
-struct snd_soc_pcm_runtime *snd_soc_get_pcm_runtime(struct snd_soc_card *card,
-		const char *dai_link)
-{
-	struct snd_soc_pcm_runtime *rtd;
-
-	for_each_card_rtds(card, rtd) {
-		if (!strcmp(rtd->dai_link->name, dai_link))
-			return rtd;
-	}
-	dev_dbg(card->dev, "ASoC: failed to find rtd %s\n", dai_link);
-	return NULL;
-}
-EXPORT_SYMBOL_GPL(snd_soc_get_pcm_runtime);
-
 static void snd_soc_flush_all_delayed_work(struct snd_soc_card *card)
 {
 	struct snd_soc_pcm_runtime *rtd;
-- 
2.7.4



More information about the Alsa-devel mailing list