Commit 94def8ea authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

ASoC: soc-core: move snd_soc_get_pcm_runtime()

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: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: default avatarRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/87blshyq6e.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 8babfb70
...@@ -391,6 +391,21 @@ EXPORT_SYMBOL_GPL(snd_soc_lookup_component); ...@@ -391,6 +391,21 @@ EXPORT_SYMBOL_GPL(snd_soc_lookup_component);
static const struct snd_soc_ops null_snd_soc_ops; 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) static void soc_release_rtd_dev(struct device *dev)
{ {
/* "dev" means "rtd->dev" */ /* "dev" means "rtd->dev" */
...@@ -491,20 +506,6 @@ static struct snd_soc_pcm_runtime *soc_new_pcm_runtime( ...@@ -491,20 +506,6 @@ static struct snd_soc_pcm_runtime *soc_new_pcm_runtime(
return NULL; 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) static void snd_soc_flush_all_delayed_work(struct snd_soc_card *card)
{ {
struct snd_soc_pcm_runtime *rtd; struct snd_soc_pcm_runtime *rtd;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment