Skip to content

Commit a342083

Browse files
committed
Input: matrix_keypad - use flush_delayed_work()
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: Dmitry Torokhov <dmitry.torokhov@gmail.com>
1 parent 33a841c commit a342083

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/input/keyboard/matrix_keypad.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ static void matrix_keypad_stop(struct input_dev *dev)
222222
keypad->stopped = true;
223223
spin_unlock_irq(&keypad->lock);
224224

225-
flush_work(&keypad->work.work);
225+
flush_delayed_work(&keypad->work);
226226
/*
227227
* matrix_keypad_scan() will leave IRQs enabled;
228228
* we should disable them now.

0 commit comments

Comments
 (0)