From: Dmitry Torokhov Date: Wed, 25 Mar 2020 17:57:54 +0000 (-0700) Subject: Input: fix stale timestamp on key autorepeat events X-Git-Tag: v5.15~74^2~86 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4134252ab7e2c339a54302b88496cb5a89cdbaec;p=platform%2Fkernel%2Flinux-starfive.git Input: fix stale timestamp on key autorepeat events We need to refresh timestamp when emitting key autorepeat events, otherwise they will carry timestamp of the original key press event. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=206929 Fixes: 3b51c44bd693 ("Input: allow drivers specify timestamp for input events") Cc: stable@vger.kernel.org Reported-by: teika kazura Tested-by: teika kazura Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/input.c b/drivers/input/input.c index ee6c323..e2eb9b9 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c @@ -190,6 +190,7 @@ static void input_repeat_key(struct timer_list *t) input_value_sync }; + input_set_timestamp(dev, ktime_get()); input_pass_values(dev, vals, ARRAY_SIZE(vals)); if (dev->rep[REP_PERIOD])