summaryrefslogtreecommitdiffstats
path: root/drivers/hid/usbhid
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2018-04-05 13:28:46 +0200
committerJiri Kosina <jkosina@suse.cz>2018-04-05 13:28:46 +0200
commite2d39e0f95cb414b1fb6530f8429ad411586922b (patch)
tree58ebf7762babc6fd8fd443fde9002cc7aa89202f /drivers/hid/usbhid
parent108ff0e8012ae10708168940c7474318fb343751 (diff)
parent2ddc8e2d2b5902b376fee51585c8eed72b8836e7 (diff)
downloadlinux-e2d39e0f95cb414b1fb6530f8429ad411586922b.tar.bz2
Merge branch 'for-4.17/upstream' into for-linus
Pull a few small generic code cleanups.
Diffstat (limited to 'drivers/hid/usbhid')
-rw-r--r--drivers/hid/usbhid/hid-core.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c
index 77c50cdfff97..af0e0d061b15 100644
--- a/drivers/hid/usbhid/hid-core.c
+++ b/drivers/hid/usbhid/hid-core.c
@@ -56,6 +56,10 @@ static unsigned int hid_jspoll_interval;
module_param_named(jspoll, hid_jspoll_interval, uint, 0644);
MODULE_PARM_DESC(jspoll, "Polling interval of joysticks");
+static unsigned int hid_kbpoll_interval;
+module_param_named(kbpoll, hid_kbpoll_interval, uint, 0644);
+MODULE_PARM_DESC(kbpoll, "Polling interval of keyboards");
+
static unsigned int ignoreled;
module_param_named(ignoreled, ignoreled, uint, 0644);
MODULE_PARM_DESC(ignoreled, "Autosuspend with active leds");
@@ -1094,7 +1098,9 @@ static int usbhid_start(struct hid_device *hid)
hid->name, endpoint->bInterval, interval);
}
- /* Change the polling interval of mice and joysticks. */
+ /* Change the polling interval of mice, joysticks
+ * and keyboards.
+ */
switch (hid->collection->usage) {
case HID_GD_MOUSE:
if (hid_mousepoll_interval > 0)
@@ -1104,6 +1110,10 @@ static int usbhid_start(struct hid_device *hid)
if (hid_jspoll_interval > 0)
interval = hid_jspoll_interval;
break;
+ case HID_GD_KEYBOARD:
+ if (hid_kbpoll_interval > 0)
+ interval = hid_kbpoll_interval;
+ break;
}
ret = -ENOMEM;