ASoC: dapm: Only mark pin widgets as dirty if we actually change state

Small optimisation for noop state updates.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
This commit is contained in:
Mark Brown 2012-02-16 11:50:07 -08:00
parent 5567d8c621
commit 1a8b2d9d5b

View 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;
}