mirror of
https://github.com/torvalds/linux.git
synced 2026-08-01 03:59:40 +02:00
drivers/staging/speakup/main: fixed jiffie comparison
speakup_key() used manual comparison of jiffies to determine the time since the last keypress, replaced it with time_after() Signed-off-by: Robin Schroer <sulamiification@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
c7f268df3f
commit
3d3cb1bffd
|
|
@ -2067,7 +2067,7 @@ speakup_key(struct vc_data *vc, int shift_state, int keycode, u_short keysym,
|
|||
if (up_flag)
|
||||
goto out;
|
||||
if (last_keycode == keycode &&
|
||||
last_spk_jiffy + MAX_DELAY > jiffies) {
|
||||
time_after(last_spk_jiffy + MAX_DELAY, jiffies)) {
|
||||
spk_close_press = 1;
|
||||
offset = spk_shift_table[shift_info + 32];
|
||||
/* double press? */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user