Skip to contentSkip to conversation

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

PATCH New Mark Brown 1 participant 1 message Feb 16, 2012

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

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

Small optimisation for noop state updates.

---
 sound/soc/soc-dapm.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
sound/soc/soc-dapm.c +3 -1
index 2844879..a2a9c11 100644
@@ -1915,10 +1915,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;
 }
Signature · 1 line
1.7.9.rc1