ASoC: wm8994: Prevent double lock of accdet_lock mutex on wm1811
authorCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Mon, 16 Jun 2014 20:24:03 +0000 (21:24 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Sep 2014 16:19:16 +0000 (09:19 -0700)
commit32eda01126f6936ec5287b395ef752ac88e6a17f
treed1f74ce02d81a7caaf6641cd887e8fd93b3cce63
parent1040b2300e25faf91cba6c299d0d0af14d52fc3f
ASoC: wm8994: Prevent double lock of accdet_lock mutex on wm1811

commit b38314179c9ccb789e6fe967cff171fa817e8978 upstream.

wm1811_micd_stop takes the accdet_lock mutex, and is called from two
places, one of which is already holding the accdet_lock. This obviously
causes a lock up.

This patch fixes this issue by removing the lock from wm1811_micd_stop
and ensuring that it is always locked externally.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/soc/codecs/wm8994.c