From: Mark Brown Date: Thu, 16 Feb 2012 19:50:07 +0000 (-0800) Subject: ASoC: dapm: Only mark pin widgets as dirty if we actually change state X-Git-Tag: v3.4-rc1~88^2^2~27^2~71 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=1a8b2d9d5b6a9909ef0633990fb40c765a791692;p=karo-tx-linux.git ASoC: dapm: Only mark pin widgets as dirty if we actually change state Small optimisation for noop state updates. Signed-off-by: Mark Brown Acked-by: Liam Girdwood --- diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 86569044f662..c9b088dab1cf 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -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; }