]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitaed9d7bd4ad155dffe4e85b616deba5475d9567f
tree1747f33018b093f605a20b8f62b57e93dcbef376
parent4dc1f15bd29dfee2c10702dcaa294da8816215c5
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