Commit f9058124 authored by Dmitry Torokhov's avatar Dmitry Torokhov Committed by Kleber Sacilotto de Souza

Input: matrix_keypad - use flush_delayed_work()

BugLink: https://bugs.launchpad.net/bugs/1822271

[ Upstream commit a342083a ]

We should be using flush_delayed_work() instead of flush_work() in
matrix_keypad_stop() to ensure that we are not missing work that is
scheduled but not yet put in the workqueue (i.e. its delay timer has not
expired yet).
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarStefan Bader <stefan.bader@canonical.com>
Acked-by: default avatarJuerg Haefliger <juerg.haefliger@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent 39a65a96
...@@ -220,7 +220,7 @@ static void matrix_keypad_stop(struct input_dev *dev) ...@@ -220,7 +220,7 @@ static void matrix_keypad_stop(struct input_dev *dev)
keypad->stopped = true; keypad->stopped = true;
spin_unlock_irq(&keypad->lock); spin_unlock_irq(&keypad->lock);
flush_work(&keypad->work.work); flush_delayed_work(&keypad->work);
/* /*
* matrix_keypad_scan() will leave IRQs enabled; * matrix_keypad_scan() will leave IRQs enabled;
* we should disable them now. * we should disable them now.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment