diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2022-09-20 06:32:16 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-09-20 12:19:30 +0100 |
commit | 3989ade2d1e7ffc900e3842dc542b9e4bb3618fe (patch) | |
tree | ae4825ba231103b65f7d9bcd4aeef53c98444635 /sound/soc/soc-dapm.c | |
parent | 5ba3522cf8b9f3a9f6cbbde1d1e9217e518e0e0a (diff) | |
download | lwn-3989ade2d1e7ffc900e3842dc542b9e4bb3618fe.tar.gz lwn-3989ade2d1e7ffc900e3842dc542b9e4bb3618fe.zip |
ASoC: soc.h: remove num_cpus/codecs
Current rtd has both dai_link pointer (A) and num_cpus/codecs (B).
(A) rtd->dai_link = dai_link;
(B) rtd->num_cpus = dai_link->num_cpus;
(B) rtd->num_codecs = dai_link->num_codecs;
But, we can get num_cpus/codecs (B) via dai_link (A).
This means we don't need to keep num_cpus/codecs on rtd.
This patch removes these.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87sfkmv9n3.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-dapm.c')
-rw-r--r-- | sound/soc/soc-dapm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 2d105bfee387..f10133f35c5d 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -4459,11 +4459,11 @@ void snd_soc_dapm_connect_dai_link_widgets(struct snd_soc_card *card) if (rtd->dai_link->dynamic) continue; - if (rtd->num_cpus == 1) { + if (rtd->dai_link->num_cpus == 1) { for_each_rtd_codec_dais(rtd, i, codec_dai) dapm_connect_dai_pair(card, rtd, codec_dai, asoc_rtd_to_cpu(rtd, 0)); - } else if (rtd->num_codecs == rtd->num_cpus) { + } else if (rtd->dai_link->num_codecs == rtd->dai_link->num_cpus) { for_each_rtd_codec_dais(rtd, i, codec_dai) dapm_connect_dai_pair(card, rtd, codec_dai, asoc_rtd_to_cpu(rtd, i)); |