From e23066df2a61036c5a9fe0b7ebbf00108f2162a5 Mon Sep 17 00:00:00 2001 From: Ramprasad Katkam Date: Mon, 15 Oct 2018 17:52:48 +0530 Subject: [PATCH] asoc: wcd937x: initialize micb lock mutex Micb lock which is used to synchronize micbias control api is not initialized causing spin lock errors. Initialize the mutex to avoid the issue. Change-Id: I580e52e1bd225c2d99bfba4657d80670296709a0 Signed-off-by: Ramprasad Katkam --- asoc/codecs/wcd937x/wcd937x.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/asoc/codecs/wcd937x/wcd937x.c b/asoc/codecs/wcd937x/wcd937x.c index db9f2be4876b..864aedab94ff 100644 --- a/asoc/codecs/wcd937x/wcd937x.c +++ b/asoc/codecs/wcd937x/wcd937x.c @@ -2324,6 +2324,7 @@ static int wcd937x_bind(struct device *dev) } wcd937x->tx_swr_dev->slave_irq = wcd937x->virq; + mutex_init(&wcd937x->micb_lock); ret = snd_soc_register_codec(dev, &soc_codec_dev_wcd937x, NULL, 0); if (ret) { @@ -2347,6 +2348,7 @@ static void wcd937x_unbind(struct device *dev) wcd_irq_exit(&wcd937x->irq_info, wcd937x->virq); snd_soc_unregister_codec(dev); component_unbind_all(dev, wcd937x); + mutex_destroy(&wcd937x->micb_lock); } static const struct of_device_id wcd937x_dt_match[] = {