Blob Blame History Raw
From 8babfb7030573f7338b141d038c2094b7bb95034 Mon Sep 17 00:00:00 2001
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date: Tue, 10 Dec 2019 09:33:55 +0900
Subject: [PATCH] ASoC: soc-core: remove snd_soc_get_dai_substream()
Git-commit: 8babfb7030573f7338b141d038c2094b7bb95034
Patch-mainline: v5.6-rc1
References: jsc#SLE-16518

No driver is using snd_soc_get_dai_substream(),
and snd_soc_get_pcm_runtime() is enough for such purpose.
We can revival it if it was needed in the future.
Let's remove unused function.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/87d0cxyq6k.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Acked-by: Takashi Iwai <tiwai@suse.de>

---
 include/sound/soc.h  |  2 --
 sound/soc/soc-core.c | 15 ---------------
 2 files changed, 17 deletions(-)

diff --git a/include/sound/soc.h b/include/sound/soc.h
index b7ba3b91d080..68ec5a051afe 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -464,8 +464,6 @@ static inline int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num)
 
 void snd_soc_disconnect_sync(struct device *dev);
 
-struct snd_pcm_substream *snd_soc_get_dai_substream(struct snd_soc_card *card,
-		const char *dai_link, int stream);
 struct snd_soc_pcm_runtime *snd_soc_get_pcm_runtime(struct snd_soc_card *card,
 		const char *dai_link);
 
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 0d436a2560e4..16265d0e48de 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -389,21 +389,6 @@ struct snd_soc_component *snd_soc_lookup_component(struct device *dev,
 }
 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)
-{
-	struct snd_soc_pcm_runtime *rtd;
-
-	for_each_card_rtds(card, rtd) {
-		if (rtd->dai_link->no_pcm &&
-			!strcmp(rtd->dai_link->name, dai_link))
-			return rtd->pcm->streams[stream].substream;
-	}
-	dev_dbg(card->dev, "ASoC: failed to find dai link %s\n", dai_link);
-	return NULL;
-}
-EXPORT_SYMBOL_GPL(snd_soc_get_dai_substream);
-
 static const struct snd_soc_ops null_snd_soc_ops;
 
 static void soc_release_rtd_dev(struct device *dev)
-- 
2.16.4