diff mbox

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

Message ID 1435311583-18695-1-git-send-email-ckeepax@opensource.wolfsonmicro.com (mailing list archive)
State Accepted
Commit ffacb48e5a4665d3d7286babb38a5af855a36bc0
Headers show

Commit Message

Charles Keepax June 26, 2015, 9:39 a.m. UTC
The commit 02aa78abec6e ("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: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
---
 sound/soc/soc-dapm.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Comments

Mark Brown June 26, 2015, 11:47 a.m. UTC | #1
On Fri, Jun 26, 2015 at 10:39:43AM +0100, Charles Keepax wrote:
> The commit 02aa78abec6e ("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.

Applied, thanks.
diff mbox

Patch

diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index aa327c9..a47a8ce 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -389,8 +389,8 @@  static int dapm_kcontrol_data_alloc(struct snd_soc_dapm_widget *widget,
 
 			data->value = template.on_val;
 
-			data->widget = snd_soc_dapm_new_control(widget->dapm,
-					&template);
+			data->widget = snd_soc_dapm_new_control_unlocked(
+						widget->dapm, &template);
 			if (!data->widget) {
 				ret = -ENOMEM;
 				goto err_name;