aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-dapm.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-02-16 14:50:07 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-02-17 11:10:33 -0500
commit1a8b2d9d5b6a9909ef0633990fb40c765a791692 (patch)
tree5eaceea869173f3338e10d92e5c247ce89cb11aa /sound/soc/soc-dapm.c
parent5567d8c621f47d83bf73ff1d35409139a4712859 (diff)
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>
Diffstat (limited to 'sound/soc/soc-dapm.c')
-rw-r--r--sound/soc/soc-dapm.c4
1 files changed, 3 insertions, 1 deletions
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,
1927 return -EINVAL; 1927 return -EINVAL;
1928 } 1928 }
1929 1929
1930 if (w->connected != status)
1931 dapm_mark_dirty(w, "pin configuration");
1932
1930 w->connected = status; 1933 w->connected = status;
1931 if (status == 0) 1934 if (status == 0)
1932 w->force = 0; 1935 w->force = 0;
1933 dapm_mark_dirty(w, "pin configuration");
1934 1936
1935 return 0; 1937 return 0;
1936} 1938}