diff options
author | Andreas Irestål <Andreas.Irestal@axis.com> | 2013-06-05 10:49:47 +0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-06-07 20:57:16 +0400 |
commit | 2894770ec17ff732f911c8495ae0504f06a5dad5 (patch) | |
tree | 1879513352d6fd27d96f9e1168839dccf46f4150 /sound/soc/codecs | |
parent | d683b96b072dc4680fc74964eca77e6a23d1fa6e (diff) | |
download | linux-2894770ec17ff732f911c8495ae0504f06a5dad5.tar.xz |
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: Andreas Irestål <Andreas.Irestal@axis.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/codecs')
-rw-r--r-- | sound/soc/codecs/tlv320aic3x.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c index 65d09d60b7c6..1514bf845e4b 100644 --- a/sound/soc/codecs/tlv320aic3x.c +++ b/sound/soc/codecs/tlv320aic3x.c @@ -187,14 +187,14 @@ static int snd_soc_dapm_put_volsw_aic3x(struct snd_kcontrol *kcontrol, break; } - - if (found) - snd_soc_dapm_sync(widget->dapm); } - ret = snd_soc_update_bits(widget->codec, reg, val_mask, val); - mutex_unlock(&widget->codec->mutex); + + if (found) + snd_soc_dapm_sync(widget->dapm); + + ret = snd_soc_update_bits_locked(widget->codec, reg, val_mask, val); return ret; } |