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

Commit ffacb48e authored by Charles Keepax's avatar Charles Keepax Committed by Mark Brown
Browse files

ASoC: dapm: Fix deadlock on auto-disable mux controls



The commit 02aa78ab ("ASoC: DAPM: Add APIs to create individual DAPM
controls.") added locking to the snd_soc_dapm_new_control function but
did not update the call to snd_soc_dapm_new_control in the auto-disable
mux code, this appears to be because the patches were sent at fairly
similar times.

This patch change the call in the auto-disable mux code to use the new
snd_soc_dapm_new_control_unlocked function instead.

Signed-off-by: default avatarCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 11e68886
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -389,8 +389,8 @@ static int dapm_kcontrol_data_alloc(struct snd_soc_dapm_widget *widget,


			data->value = template.on_val;
			data->value = template.on_val;


			data->widget = snd_soc_dapm_new_control(widget->dapm,
			data->widget = snd_soc_dapm_new_control_unlocked(
					&template);
						widget->dapm, &template);
			if (!data->widget) {
			if (!data->widget) {
				ret = -ENOMEM;
				ret = -ENOMEM;
				goto err_name;
				goto err_name;