diff options
| -rw-r--r-- | Documentation/admin-guide/kernel-parameters.txt | 3 | ||||
| -rw-r--r-- | drivers/hid/usbhid/hid-core.c | 18 |
2 files changed, 18 insertions, 3 deletions
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index 635d11135090..14ffef04113c 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt | |||
| @@ -4085,6 +4085,9 @@ | |||
| 4085 | usbhid.mousepoll= | 4085 | usbhid.mousepoll= |
| 4086 | [USBHID] The interval which mice are to be polled at. | 4086 | [USBHID] The interval which mice are to be polled at. |
| 4087 | 4087 | ||
| 4088 | usbhid.jspoll= | ||
| 4089 | [USBHID] The interval which joysticks are to be polled at. | ||
| 4090 | |||
| 4088 | usb-storage.delay_use= | 4091 | usb-storage.delay_use= |
| 4089 | [UMS] The delay in seconds before a new device is | 4092 | [UMS] The delay in seconds before a new device is |
| 4090 | scanned for Logical Units (default 1). | 4093 | scanned for Logical Units (default 1). |
diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c index 961bc6fdd2d9..b06fee1b8e47 100644 --- a/drivers/hid/usbhid/hid-core.c +++ b/drivers/hid/usbhid/hid-core.c | |||
| @@ -52,6 +52,10 @@ static unsigned int hid_mousepoll_interval; | |||
| 52 | module_param_named(mousepoll, hid_mousepoll_interval, uint, 0644); | 52 | module_param_named(mousepoll, hid_mousepoll_interval, uint, 0644); |
| 53 | MODULE_PARM_DESC(mousepoll, "Polling interval of mice"); | 53 | MODULE_PARM_DESC(mousepoll, "Polling interval of mice"); |
| 54 | 54 | ||
| 55 | static unsigned int hid_jspoll_interval; | ||
| 56 | module_param_named(jspoll, hid_jspoll_interval, uint, 0644); | ||
| 57 | MODULE_PARM_DESC(jspoll, "Polling interval of joysticks"); | ||
| 58 | |||
| 55 | static unsigned int ignoreled; | 59 | static unsigned int ignoreled; |
| 56 | module_param_named(ignoreled, ignoreled, uint, 0644); | 60 | module_param_named(ignoreled, ignoreled, uint, 0644); |
| 57 | MODULE_PARM_DESC(ignoreled, "Autosuspend with active leds"); | 61 | MODULE_PARM_DESC(ignoreled, "Autosuspend with active leds"); |
| @@ -1081,9 +1085,17 @@ static int usbhid_start(struct hid_device *hid) | |||
| 1081 | hid->name, endpoint->bInterval, interval); | 1085 | hid->name, endpoint->bInterval, interval); |
| 1082 | } | 1086 | } |
| 1083 | 1087 | ||
| 1084 | /* Change the polling interval of mice. */ | 1088 | /* Change the polling interval of mice and joysticks. */ |
| 1085 | if (hid->collection->usage == HID_GD_MOUSE && hid_mousepoll_interval > 0) | 1089 | switch (hid->collection->usage) { |
| 1086 | interval = hid_mousepoll_interval; | 1090 | case HID_GD_MOUSE: |
| 1091 | if (hid_mousepoll_interval > 0) | ||
| 1092 | interval = hid_mousepoll_interval; | ||
| 1093 | break; | ||
| 1094 | case HID_GD_JOYSTICK: | ||
| 1095 | if (hid_jspoll_interval > 0) | ||
| 1096 | interval = hid_jspoll_interval; | ||
| 1097 | break; | ||
| 1098 | } | ||
| 1087 | 1099 | ||
| 1088 | ret = -ENOMEM; | 1100 | ret = -ENOMEM; |
| 1089 | if (usb_endpoint_dir_in(endpoint)) { | 1101 | if (usb_endpoint_dir_in(endpoint)) { |
