ASoC: soc-core.c: share code for snd_soc_of_get_dai_link_cpus/codecs()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Wed, 22 Jun 2022 05:54:13 +0000 (05:54 +0000)
committerMark Brown <broonie@kernel.org>
Wed, 29 Jun 2022 17:10:15 +0000 (18:10 +0100)
commit9cc69528188a4e3eb24370f6c05a92791ac249ba
tree1747f33018b093f605a20b8f62b57e93dcbef376
parent586fb2641371cf7f23a401ab1c79b17e3ec457f4
ASoC: soc-core.c: share code for snd_soc_of_get_dai_link_cpus/codecs()

ASoC has snd_soc_of_get_dai_link_cpus/codecs(), and these are almost same
code. The main difference are below.

for_each_link_cpus() dai_link->cpus dai_link->num_cpus
for_each_link_codecs() dai_link->codecs dai_link->num_codecs

Because we need to use these parameters, we can't share full-code for now,
but can share some codes.
This patch adds __snd_soc_of_get/put_xxx() functions, and share the code.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87y1xpp7ju.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-core.c