summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHimanshu Aggarwal <haggarwa@codeaurora.org>2015-09-07 12:15:06 +0530
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:57:56 -0700
commitbbcb3e5aaba11863e66d0b4e6913ee31f28ce441 (patch)
tree4026817db9b0d39fd132d6bc9e47aab22a968291
parentcabb738b70e5a2fea055ba173246e1242a22d908 (diff)
input: synaptics_dsx_core: clear all outstanding completions
The secure touch ISR and the poll logic in the user space layer is going out of sync because the completion lock in the driver is getting released in some corner cases unexpectedly. Clear all outstanding completions before waiting for one helps fix the issue. Change-Id: Ia3a6d318330263e7bfd8dfc3cea71c5300ab82b4 Signed-off-by: Himanshu Aggarwal <haggarwa@codeaurora.org>
-rw-r--r--drivers/input/touchscreen/synaptics_dsx/synaptics_dsx_core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/input/touchscreen/synaptics_dsx/synaptics_dsx_core.c b/drivers/input/touchscreen/synaptics_dsx/synaptics_dsx_core.c
index 79d1e570e656..6aa14fe54e69 100644
--- a/drivers/input/touchscreen/synaptics_dsx/synaptics_dsx_core.c
+++ b/drivers/input/touchscreen/synaptics_dsx/synaptics_dsx_core.c
@@ -499,6 +499,7 @@ static irqreturn_t synaptics_filter_interrupt(
{
if (atomic_read(&rmi4_data->st_enabled)) {
if (atomic_cmpxchg(&rmi4_data->st_pending_irqs, 0, 1) == 0) {
+ reinit_completion(&rmi4_data->st_irq_processed);
synaptics_secure_touch_notify(rmi4_data);
wait_for_completion_interruptible(
&rmi4_data->st_irq_processed);