diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2020-03-30 10:48:14 +0900 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-04-14 14:00:45 +0100 |
commit | 01faf501eefa86fa6f334bb9c71a48498de653e6 (patch) | |
tree | a9e31f32900c81408c8530440b35c5822527130d /sound/soc/soc-core.c | |
parent | 49648d02008dd75ddd84b16f9abf29f24c383519 (diff) | |
download | kernel_replicant_linux-01faf501eefa86fa6f334bb9c71a48498de653e6.tar.gz kernel_replicant_linux-01faf501eefa86fa6f334bb9c71a48498de653e6.tar.bz2 kernel_replicant_linux-01faf501eefa86fa6f334bb9c71a48498de653e6.zip |
ASoC: soc-core: tidyup soc_new_pcm_runtime() rtd setups
soc_new_pcm_runtime() setups rtd, but code is very random.
This patch tidyup it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/87ftdqbokh.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 | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 8cef4fd6df36..4d617c495864 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -492,17 +492,12 @@ static struct snd_soc_pcm_runtime *soc_new_pcm_runtime( rtd->codec_dais = &rtd->dais[dai_link->num_cpus]; rtd->num_cpus = dai_link->num_cpus; rtd->num_codecs = dai_link->num_codecs; - - /* - * rtd remaining settings - */ - rtd->card = card; - rtd->dai_link = dai_link; + rtd->card = card; + rtd->dai_link = dai_link; + rtd->num = card->num_rtd++; /* see for_each_card_rtds */ list_add_tail(&rtd->list, &card->rtd_list); - rtd->num = card->num_rtd; - card->num_rtd++; return rtd; |