ASoC: Refactor some conditions and loop in soc_bind_dai_link()
authorStephen Warren <swarren@nvidia.com>
Wed, 7 Dec 2011 20:58:27 +0000 (13:58 -0700)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Fri, 9 Dec 2011 04:45:54 +0000 (12:45 +0800)
commit2610ab7767bba916f65094d71cfed3b8281cba08
treeac57b90f8712120b1d15abc86439accde067c585
parent7b9b5e11704afb8f05aa6490c3b4bb2cc328647c
ASoC: Refactor some conditions and loop in soc_bind_dai_link()

Transform some loops from:

for_each(x) {
    if (f(x)) {
        work_on(x);
    }
}

to new structure:

for_each(x) {
    if (!f(x))
        continue;

    work_on(x);
}

This will allow future modification of f(x) with less impact to the code.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/soc-core.c