Commit 1a8b2d9d authored by Mark Brown's avatar Mark Brown

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

Small optimisation for noop state updates.
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: default avatarLiam Girdwood <lrg@ti.com>
parent 5567d8c6
...@@ -1927,10 +1927,12 @@ static int snd_soc_dapm_set_pin(struct snd_soc_dapm_context *dapm, ...@@ -1927,10 +1927,12 @@ static int snd_soc_dapm_set_pin(struct snd_soc_dapm_context *dapm,
return -EINVAL; return -EINVAL;
} }
if (w->connected != status)
dapm_mark_dirty(w, "pin configuration");
w->connected = status; w->connected = status;
if (status == 0) if (status == 0)
w->force = 0; w->force = 0;
dapm_mark_dirty(w, "pin configuration");
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment