linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Input: matrix_keypad - use flush_delayed_work()
@ 2019-02-07 22:46 Dmitry Torokhov
  2019-02-10 17:43 ` Sven Van Asbroeck
  0 siblings, 1 reply; 4+ messages in thread
From: Dmitry Torokhov @ 2019-02-07 22:46 UTC (permalink / raw)
  To: linux-input; +Cc: Sven Van Asbroeck, tj, linux-kernel

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>
---
 drivers/input/keyboard/matrix_keypad.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/keyboard/matrix_keypad.c b/drivers/input/keyboard/matrix_keypad.c
index 403452ef00e6..3d1cb7bf5e35 100644
--- a/drivers/input/keyboard/matrix_keypad.c
+++ b/drivers/input/keyboard/matrix_keypad.c
@@ -222,7 +222,7 @@ static void matrix_keypad_stop(struct input_dev *dev)
 	keypad->stopped = true;
 	spin_unlock_irq(&keypad->lock);
 
-	flush_work(&keypad->work.work);
+	flush_delayed_work(&keypad->work);
 	/*
 	 * matrix_keypad_scan() will leave IRQs enabled;
 	 * we should disable them now.
-- 
2.20.1.611.gfbb209baf1-goog


-- 
Dmitry

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-02-11 12:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-07 22:46 [PATCH] Input: matrix_keypad - use flush_delayed_work() Dmitry Torokhov
2019-02-10 17:43 ` Sven Van Asbroeck
2019-02-11  8:29   ` Dmitry Torokhov
2019-02-11 12:42     ` Sven Van Asbroeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).