input: synaptics_dsx: fix mutex init
Initialize mutex before using in irq handler. CRs-fixed: 2047720 Change-Id: I5ebfbc22f2a64dde239fcbb13eb26be50543b484 Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
This commit is contained in:
parent
211854c904
commit
9f117985b6
1 changed files with 7 additions and 7 deletions
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* Copyright (C) 2012 Alexandra Chin <alexandra.chin@tw.synaptics.com>
|
||||
* Copyright (C) 2012 Scott Lin <scott.lin@tw.synaptics.com>
|
||||
* Copyright (c) 2014-2016, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2014-2017, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -3774,6 +3774,12 @@ static int synaptics_rmi4_probe(struct platform_device *pdev)
|
|||
|
||||
rmi4_data->irq = gpio_to_irq(bdata->irq_gpio);
|
||||
|
||||
if (!exp_data.initialized) {
|
||||
mutex_init(&exp_data.mutex);
|
||||
INIT_LIST_HEAD(&exp_data.list);
|
||||
exp_data.initialized = true;
|
||||
}
|
||||
|
||||
retval = synaptics_rmi4_irq_enable(rmi4_data, true);
|
||||
if (retval < 0) {
|
||||
dev_err(&pdev->dev,
|
||||
|
@ -3782,12 +3788,6 @@ static int synaptics_rmi4_probe(struct platform_device *pdev)
|
|||
goto err_enable_irq;
|
||||
}
|
||||
|
||||
if (!exp_data.initialized) {
|
||||
mutex_init(&exp_data.mutex);
|
||||
INIT_LIST_HEAD(&exp_data.list);
|
||||
exp_data.initialized = true;
|
||||
}
|
||||
|
||||
exp_data.workqueue = create_singlethread_workqueue("dsx_exp_workqueue");
|
||||
INIT_DELAYED_WORK(&exp_data.work, synaptics_rmi4_exp_fn_work);
|
||||
exp_data.rmi4_data = rmi4_data;
|
||||
|
|
Loading…
Add table
Reference in a new issue