diff options
author | Mohan Pallaka <mpallaka@codeaurora.org> | 2017-05-08 11:51:41 -0700 |
---|---|---|
committer | Mohan Pallaka <mpallaka@codeaurora.org> | 2017-05-16 19:57:28 -0700 |
commit | 9f117985b69686f253cd65e3a676326c44cdd8d3 (patch) | |
tree | 3deda0e263201ed284f7f8dc82cc0382918b6716 /drivers/input/touchscreen | |
parent | 211854c904f68128aa506ac2c3be2a7027ab78d3 (diff) |
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>
Diffstat (limited to 'drivers/input/touchscreen')
-rw-r--r-- | drivers/input/touchscreen/synaptics_dsx/synaptics_dsx_core.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/input/touchscreen/synaptics_dsx/synaptics_dsx_core.c b/drivers/input/touchscreen/synaptics_dsx/synaptics_dsx_core.c index 206941708141..daa35845fc0a 100644 --- a/drivers/input/touchscreen/synaptics_dsx/synaptics_dsx_core.c +++ b/drivers/input/touchscreen/synaptics_dsx/synaptics_dsx_core.c @@ -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; |