diff mbox

ASoC: wm5102: Initialize dac_comp_lock mutex

Message ID 1417810119-7772-1-git-send-email-broonie@kernel.org (mailing list archive)
State Accepted
Commit 47370022d2ca552ab524bb14211fefa3a2518ba8
Headers show

Commit Message

Mark Brown Dec. 5, 2014, 8:08 p.m. UTC
Commit d74bcaaeb6682 (ASoC: wm5102: Move ultrasonic response settings
lock to the driver level) created a driver local mutex for protecting
the ultrasonic response settings but neglected to initialize that mutex,
causing loud complaints from lockep and potential runtime failures. Fix
this by initializing the mutex.

Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/codecs/wm5102.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Charles Keepax Dec. 8, 2014, 9:11 a.m. UTC | #1
On Fri, Dec 05, 2014 at 08:08:39PM +0000, Mark Brown wrote:
> Commit d74bcaaeb6682 (ASoC: wm5102: Move ultrasonic response settings
> lock to the driver level) created a driver local mutex for protecting
> the ultrasonic response settings but neglected to initialize that mutex,
> causing loud complaints from lockep and potential runtime failures. Fix
> this by initializing the mutex.
> 
> Signed-off-by: Mark Brown <broonie@kernel.org>
> ---

Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

Thanks,
Charles
diff mbox

Patch

diff --git a/sound/soc/codecs/wm5102.c b/sound/soc/codecs/wm5102.c
index 8c99b7cf47e0..f439ae052128 100644
--- a/sound/soc/codecs/wm5102.c
+++ b/sound/soc/codecs/wm5102.c
@@ -1900,6 +1900,8 @@  static int wm5102_probe(struct platform_device *pdev)
 		return -ENOMEM;
 	platform_set_drvdata(pdev, wm5102);
 
+	mutex_init(&arizona->dac_comp_lock);
+
 	wm5102->core.arizona = arizona;
 	wm5102->core.num_inputs = 6;