USB: ati_remote.c: autorepeat fix

When HZ is set to 250 (new default) or 100, the time span during which
repeated events from the device are ignored could be too small due to
ms->jiffies rounding. This causes the auto repeat to kick in early making
it impossible for the user to generate individual press/release events.
Increate the timeout to compensate.

Signed-off-by: Marko Macek <Marko.Macek@gmx.net>
Cc: Dmitry Torokhov <dtor_core@ameritech.net>
Cc: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by Marko Macek and committed by Greg Kroah-Hartman 168ffc44 064e875a

+2 -3
+2 -3
drivers/usb/input/ati_remote.c
··· 152 152 * events. The hardware generates 5 events for the first keypress 153 153 * and we have to take this into account for an accurate repeat 154 154 * behaviour. 155 - * (HZ / 20) == 50 ms and works well for me. 156 155 */ 157 - #define FILTER_TIME (HZ / 20) 156 + #define FILTER_TIME 60 /* msec */ 158 157 159 158 struct ati_remote { 160 159 struct input_dev *idev; ··· 466 467 /* Filter duplicate events which happen "too close" together. */ 467 468 if ((ati_remote->old_data[0] == data[1]) && 468 469 (ati_remote->old_data[1] == data[2]) && 469 - time_before(jiffies, ati_remote->old_jiffies + FILTER_TIME)) { 470 + time_before(jiffies, ati_remote->old_jiffies + msecs_to_jiffies(FILTER_TIME))) { 470 471 ati_remote->repeat_count++; 471 472 } else { 472 473 ati_remote->repeat_count = 0;