kernel: bump 4.19 to 4.19.123
[oweals/openwrt.git] / target / linux / bcm27xx / patches-4.19 / 950-0121-hid-Reduce-default-mouse-polling-interval-to-60Hz.patch
1 From 119f98cc4c860085809584b7504ca61bac70586e Mon Sep 17 00:00:00 2001
2 From: popcornmix <popcornmix@gmail.com>
3 Date: Mon, 14 Jul 2014 22:02:09 +0100
4 Subject: [PATCH] hid: Reduce default mouse polling interval to 60Hz
5
6 Reduces overhead when using X
7 ---
8  drivers/hid/usbhid/hid-core.c | 6 ++++--
9  1 file changed, 4 insertions(+), 2 deletions(-)
10
11 --- a/drivers/hid/usbhid/hid-core.c
12 +++ b/drivers/hid/usbhid/hid-core.c
13 @@ -48,7 +48,7 @@
14   * Module parameters.
15   */
16  
17 -static unsigned int hid_mousepoll_interval;
18 +static unsigned int hid_mousepoll_interval = ~0;
19  module_param_named(mousepoll, hid_mousepoll_interval, uint, 0644);
20  MODULE_PARM_DESC(mousepoll, "Polling interval of mice");
21  
22 @@ -1117,7 +1117,9 @@ static int usbhid_start(struct hid_devic
23                  */
24                 switch (hid->collection->usage) {
25                 case HID_GD_MOUSE:
26 -                       if (hid_mousepoll_interval > 0)
27 +                       if (hid_mousepoll_interval == ~0 && interval < 16)
28 +                               interval = 16;
29 +                       else if (hid_mousepoll_interval != ~0 && hid_mousepoll_interval != 0)
30                                 interval = hid_mousepoll_interval;
31                         break;
32                 case HID_GD_JOYSTICK: