mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 22:40:54 -04:00
asoc: wcd938x: 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: I98c50fec8e8531333de643a85433d3e5973bfd14 Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
This commit is contained in:
parent
c63ec8cd8f
commit
3dd19d0b73
1 changed files with 8 additions and 1 deletions
|
|
@ -2923,9 +2923,10 @@ static int wcd938x_probe(struct platform_device *pdev)
|
|||
goto err;
|
||||
}
|
||||
|
||||
mutex_init(&wcd938x->micb_lock);
|
||||
ret = wcd938x_add_slave_components(dev, &match);
|
||||
if (ret)
|
||||
goto err;
|
||||
goto err_lock_init;
|
||||
|
||||
wcd938x_reset(dev);
|
||||
|
||||
|
|
@ -2934,13 +2935,19 @@ static int wcd938x_probe(struct platform_device *pdev)
|
|||
return component_master_add_with_match(dev,
|
||||
&wcd938x_comp_ops, match);
|
||||
|
||||
err_lock_init:
|
||||
mutex_destroy(&wcd938x->micb_lock);
|
||||
err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int wcd938x_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct wcd938x_priv *wcd938x = NULL;
|
||||
|
||||
wcd938x = platform_get_drvdata(pdev);
|
||||
component_master_del(&pdev->dev, &wcd938x_comp_ops);
|
||||
mutex_destroy(&wcd938x->micb_lock);
|
||||
dev_set_drvdata(&pdev->dev, NULL);
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue