Skip to content

Commit

Permalink
Input: fix stale timestamp on key autorepeat events
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
dtor committed Mar 27, 2020
1 parent fbf6679 commit 4134252
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/input/input.c
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down

0 comments on commit 4134252

Please sign in to comment.