diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2019-12-10 09:34:01 +0900 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-12-10 13:15:02 +0000 |
commit | 94def8ea66be2ea9f6aac61549b6b5874bca6235 (patch) | |
tree | 12454dc2992506997a0238b1cffc7fd87b76eee9 /sound/soc/soc-core.c | |
parent | 8babfb7030573f7338b141d038c2094b7bb95034 (diff) | |
download | linux-94def8ea66be2ea9f6aac61549b6b5874bca6235.tar.gz linux-94def8ea66be2ea9f6aac61549b6b5874bca6235.tar.bz2 linux-94def8ea66be2ea9f6aac61549b6b5874bca6235.zip |
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: 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/87blshyq6e.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r-- | sound/soc/soc-core.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 16265d0e48de..f215a37fd3d6 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 @@ free_rtd: 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; |