提交 2894770e 编写于 作者: A Andreas Irestål 提交者: Mark Brown

ASoC: tlv320aic3x: Remove deadlock from snd_soc_dapm_put_volsw_aic3x()

When calling snd_soc_dapm_sync(), it eventually tries to lock the same mutex
already locked in snd_soc_dapm_put_volsw_aic3x() and a deadlock occurs. By
moving the mutex unlock to just before snd_soc_dapm_sync(), this deadlock is
prevented. This problem was introduced in Linux 3.5
Signed-off-by: NAndreas Irestål <Andreas.Irestal@axis.com>
Signed-off-by: NMark Brown <broonie@linaro.org>
上级 d683b96b
......@@ -187,14 +187,14 @@ static int snd_soc_dapm_put_volsw_aic3x(struct snd_kcontrol *kcontrol,
break;
}
}
mutex_unlock(&widget->codec->mutex);
if (found)
snd_soc_dapm_sync(widget->dapm);
}
ret = snd_soc_update_bits(widget->codec, reg, val_mask, val);
mutex_unlock(&widget->codec->mutex);
ret = snd_soc_update_bits_locked(widget->codec, reg, val_mask, val);
return ret;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册