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>
This commit is contained in:
Himanshu Aggarwal 2015-09-07 12:15:06 +05:30 committed by David Keitel
parent cabb738b70
commit bbcb3e5aab

View file

@ -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);