Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -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;
}
}