Revert "hid: Reduce default mouse polling interval to 60Hz"
authorpopcornmix <popcornmix@gmail.com>
Wed, 24 May 2017 17:06:02 +0000 (18:06 +0100)
committerRaspbian kernel package updater <root@raspbian.org>
Sat, 31 Mar 2018 14:54:16 +0000 (15:54 +0100)
This reverts commit b45c0448b60d691508251cdccf242ea43bbabb14.

drivers/hid/usbhid/hid-core.c

index fb8777ab070b699ba50fd8bc8d9d86971f6f9f93..7838343eb37c541d698a7e78ff265e789fda7c98 100644 (file)
@@ -49,7 +49,7 @@
  * Module parameters.
  */
 
-static unsigned int hid_mousepoll_interval = ~0;
+static unsigned int hid_mousepoll_interval;
 module_param_named(mousepoll, hid_mousepoll_interval, uint, 0644);
 MODULE_PARM_DESC(mousepoll, "Polling interval of mice");
 
@@ -1093,12 +1093,8 @@ static int usbhid_start(struct hid_device *hid)
                }
 
                /* Change the polling interval of mice. */
-               if (hid->collection->usage == HID_GD_MOUSE) {
-                               if (hid_mousepoll_interval == ~0 && interval < 16)
-                                               interval = 16;
-                               else if (hid_mousepoll_interval != ~0 && hid_mousepoll_interval != 0)
-                                               interval = hid_mousepoll_interval;
-               }
+               if (hid->collection->usage == HID_GD_MOUSE && hid_mousepoll_interval > 0)
+                       interval = hid_mousepoll_interval;
 
                ret = -ENOMEM;
                if (usb_endpoint_dir_in(endpoint)) {