aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/tegra
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2019-12-10 09:34:08 +0900
committerMark Brown <broonie@kernel.org>2019-12-10 13:15:21 +0000
commit4468189ff307f294491628a49702a04de22bffb8 (patch)
treee02d43aa454324ac5f043d5f4f2e037fb220bbfc /sound/soc/tegra
parentASoC: soc-core: move snd_soc_get_pcm_runtime() (diff)
downloadlinux-dev-4468189ff307f294491628a49702a04de22bffb8.tar.xz
linux-dev-4468189ff307f294491628a49702a04de22bffb8.zip
ASoC: soc-core: find rtd via dai_link pointer at snd_soc_get_pcm_runtime()
Current snd_soc_get_pcm_runtime() is finding rtd by checking dai_link name. But, it is strange and waste of CPU power, because its user want to get from rtd from dai_link, not from dai_link name. This patch find rtd via dai_link pointer instead of its name. 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/87a781yq67.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/tegra')
-rw-r--r--sound/soc/tegra/tegra_wm8903.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/tegra/tegra_wm8903.c b/sound/soc/tegra/tegra_wm8903.c
index 6211dfda2195..f08d3489c3cf 100644
--- a/sound/soc/tegra/tegra_wm8903.c
+++ b/sound/soc/tegra/tegra_wm8903.c
@@ -186,7 +186,7 @@ static int tegra_wm8903_init(struct snd_soc_pcm_runtime *rtd)
static int tegra_wm8903_remove(struct snd_soc_card *card)
{
struct snd_soc_pcm_runtime *rtd =
- snd_soc_get_pcm_runtime(card, card->dai_link[0].name);
+ snd_soc_get_pcm_runtime(card, &card->dai_link[0]);
struct snd_soc_dai *codec_dai = rtd->codec_dai;
struct snd_soc_component *component = codec_dai->component;