]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: core: Add helpers for codec and codec_dai search
authorMisael Lopez Cruz <misael.lopez@ti.com>
Fri, 21 Mar 2014 15:27:25 +0000 (16:27 +0100)
committerMark Brown <broonie@linaro.org>
Mon, 14 Apr 2014 19:37:25 +0000 (20:37 +0100)
commitb1ba82ceb425cb2e6fa7cff8554c4633abbac655
tree34a3289273aba7fdc6894221ac42432dd24a57a6
parent03a169e57a9a3fd69c1713c317a06f163ad63b5c
ASoC: core: Add helpers for codec and codec_dai search

Add dedicated helpers for codec and codec_dai search in preparation
for DAI-multicodec. It will help reducing the extra indentation
that will be introduced by the iteration over multiple codecs.

Previous implementation unnecessarily kept searching for a matching
codec in the remaining register codecs even if it was already found.

Fix that by returning in case of matching.

Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
[fparent@baylibre.com: Adapt to 3.14+]
Signed-off-by: Fabien Parent <fparent@baylibre.com>
Signed-off-by: Benoit Cousson <bcousson@baylibre.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/soc-core.c