Skip to content

Commit 4134252

Browse files
committed
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: 3b51c44 ("Input: allow drivers specify timestamp for input events") Cc: [email protected] Reported-by: teika kazura <[email protected]> Tested-by: teika kazura <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent fbf6679 commit 4134252

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/input/input.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ static void input_repeat_key(struct timer_list *t)
190190
input_value_sync
191191
};
192192

193+
input_set_timestamp(dev, ktime_get());
193194
input_pass_values(dev, vals, ARRAY_SIZE(vals));
194195

195196
if (dev->rep[REP_PERIOD])

0 commit comments

Comments
 (0)