[PATCH 3/4] ASoC: soc-core: tidyup soc_new_pcm_runtime() rtd setups
Kuninori Morimoto
kuninori.morimoto.gx at renesas.com
Mon Mar 30 03:48:14 CEST 2020
From: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
soc_new_pcm_runtime() setups rtd, but code is very random.
This patch tidyup it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
Tested-by: Pierre-Louis Bossart <pierre-louis.bossart at linux.intel.com>
---
sound/soc/soc-core.c | 11 +++--------
1 file 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;
--
2.17.1
More information about the Alsa-devel
mailing list