ASoC: Use DAPM context rather than CODEC when constructing sequences
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Fri, 12 Nov 2010 15:28:42 +0000 (15:28 +0000)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 16 Nov 2010 11:40:14 +0000 (11:40 +0000)
DAPM widgets may be associated with non-CODEC devices so compare based
on the DAPM context rather than the CODEC pointer.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
sound/soc/soc-dapm.c

index 60c8dec..02b6ac4 100644 (file)
@@ -710,8 +710,8 @@ static int dapm_seq_compare(struct snd_soc_dapm_widget *a,
                return sort[a->id] - sort[b->id];
        if (a->reg != b->reg)
                return a->reg - b->reg;
-       if (a->codec != b->codec)
-               return (unsigned long)a->codec - (unsigned long)b->codec;
+       if (a->dapm != b->dapm)
+               return (unsigned long)a->dapm - (unsigned long)b->dapm;
 
        return 0;
 }