]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: core: Move non-shared code paths out of snd_soc_post_component_init()
authorLars-Peter Clausen <lars@metafoo.de>
Tue, 1 Jul 2014 20:13:48 +0000 (22:13 +0200)
committerMark Brown <broonie@linaro.org>
Wed, 2 Jul 2014 20:24:13 +0000 (21:24 +0100)
commita8cb3e123b29f3c6a423182d01d47a2c1cf4e61d
treefe4e7dd1b0d203b4843ff49684730c7d0539b830
parenteb690edcb4a1936475246f14a7fda22f22b85803
ASoC: core: Move non-shared code paths out of snd_soc_post_component_init()

There are two call sites for snd_soc_post_component_init(), one passes 0 and the
other 1 for the 'dailess' parameter of snd_soc_post_component_init(). Depending
on whether 'dailess' is 0 or 1 snd_soc_post_component_init() runs different code
at the beginning and the end of the function. The patch moves this conditional
code out of snd_soc_post_component_init() and into the call sites. This removes
the need for snd_soc_post_component_init() to know whether it is called for a
DAI link or a aux dev.

Also do the initialization of rtd->card when the rtd struct is allocated.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/soc-core.c