]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
ASoC: dapm: Only mark pin widgets as dirty if we actually change state
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 16 Feb 2012 19:50:07 +0000 (11:50 -0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Fri, 17 Feb 2012 16:10:33 +0000 (08:10 -0800)
Small optimisation for noop state updates.

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

index 86569044f66269ecfc59eccee2123e0174950ecf..c9b088dab1cf4cad72d0ef2248deff11391b203b 100644 (file)
@@ -1927,10 +1927,12 @@ static int snd_soc_dapm_set_pin(struct snd_soc_dapm_context *dapm,
                return -EINVAL;
        }
 
+       if (w->connected != status)
+               dapm_mark_dirty(w, "pin configuration");
+
        w->connected = status;
        if (status == 0)
                w->force = 0;
-       dapm_mark_dirty(w, "pin configuration");
 
        return 0;
 }