diff options
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/hid-cando.c | 2 | ||||
-rw-r--r-- | drivers/hid/hid-core.c | 2 | ||||
-rw-r--r-- | drivers/hid/hid-debug.c | 1 | ||||
-rw-r--r-- | drivers/hid/hid-ids.h | 5 | ||||
-rw-r--r-- | drivers/hid/hid-roccat.c | 1 | ||||
-rw-r--r-- | drivers/hid/hidraw.c | 26 | ||||
-rw-r--r-- | drivers/hid/usbhid/hid-quirks.c | 1 | ||||
-rw-r--r-- | drivers/hid/usbhid/hiddev.c | 1 |
8 files changed, 35 insertions, 4 deletions
diff --git a/drivers/hid/hid-cando.c b/drivers/hid/hid-cando.c index 4267a6fdc27..5925bdcd417 100644 --- a/drivers/hid/hid-cando.c +++ b/drivers/hid/hid-cando.c | |||
@@ -237,6 +237,8 @@ static const struct hid_device_id cando_devices[] = { | |||
237 | USB_DEVICE_ID_CANDO_MULTI_TOUCH) }, | 237 | USB_DEVICE_ID_CANDO_MULTI_TOUCH) }, |
238 | { HID_USB_DEVICE(USB_VENDOR_ID_CANDO, | 238 | { HID_USB_DEVICE(USB_VENDOR_ID_CANDO, |
239 | USB_DEVICE_ID_CANDO_MULTI_TOUCH_11_6) }, | 239 | USB_DEVICE_ID_CANDO_MULTI_TOUCH_11_6) }, |
240 | { HID_USB_DEVICE(USB_VENDOR_ID_CANDO, | ||
241 | USB_DEVICE_ID_CANDO_MULTI_TOUCH_15_6) }, | ||
240 | { } | 242 | { } |
241 | }; | 243 | }; |
242 | MODULE_DEVICE_TABLE(hid, cando_devices); | 244 | MODULE_DEVICE_TABLE(hid, cando_devices); |
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 000e0f423ae..5ac2be978c9 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c | |||
@@ -1293,6 +1293,7 @@ static const struct hid_device_id hid_blacklist[] = { | |||
1293 | { HID_USB_DEVICE(USB_VENDOR_ID_BTC, USB_DEVICE_ID_BTC_EMPREX_REMOTE_2) }, | 1293 | { HID_USB_DEVICE(USB_VENDOR_ID_BTC, USB_DEVICE_ID_BTC_EMPREX_REMOTE_2) }, |
1294 | { HID_USB_DEVICE(USB_VENDOR_ID_CANDO, USB_DEVICE_ID_CANDO_MULTI_TOUCH) }, | 1294 | { HID_USB_DEVICE(USB_VENDOR_ID_CANDO, USB_DEVICE_ID_CANDO_MULTI_TOUCH) }, |
1295 | { HID_USB_DEVICE(USB_VENDOR_ID_CANDO, USB_DEVICE_ID_CANDO_MULTI_TOUCH_11_6) }, | 1295 | { HID_USB_DEVICE(USB_VENDOR_ID_CANDO, USB_DEVICE_ID_CANDO_MULTI_TOUCH_11_6) }, |
1296 | { HID_USB_DEVICE(USB_VENDOR_ID_CANDO, USB_DEVICE_ID_CANDO_MULTI_TOUCH_15_6) }, | ||
1296 | { HID_USB_DEVICE(USB_VENDOR_ID_CHERRY, USB_DEVICE_ID_CHERRY_CYMOTION) }, | 1297 | { HID_USB_DEVICE(USB_VENDOR_ID_CHERRY, USB_DEVICE_ID_CHERRY_CYMOTION) }, |
1297 | { HID_USB_DEVICE(USB_VENDOR_ID_CHERRY, USB_DEVICE_ID_CHERRY_CYMOTION_SOLAR) }, | 1298 | { HID_USB_DEVICE(USB_VENDOR_ID_CHERRY, USB_DEVICE_ID_CHERRY_CYMOTION_SOLAR) }, |
1298 | { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_TACTICAL_PAD) }, | 1299 | { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_TACTICAL_PAD) }, |
@@ -1664,6 +1665,7 @@ static const struct hid_device_id hid_ignore_list[] = { | |||
1664 | { HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1006) }, | 1665 | { HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1006) }, |
1665 | { HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1007) }, | 1666 | { HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1007) }, |
1666 | { HID_USB_DEVICE(USB_VENDOR_ID_IMATION, USB_DEVICE_ID_DISC_STAKKA) }, | 1667 | { HID_USB_DEVICE(USB_VENDOR_ID_IMATION, USB_DEVICE_ID_DISC_STAKKA) }, |
1668 | { HID_USB_DEVICE(USB_VENDOR_ID_JESS, USB_DEVICE_ID_JESS_YUREX) }, | ||
1667 | { HID_USB_DEVICE(USB_VENDOR_ID_KBGEAR, USB_DEVICE_ID_KBGEAR_JAMSTUDIO) }, | 1669 | { HID_USB_DEVICE(USB_VENDOR_ID_KBGEAR, USB_DEVICE_ID_KBGEAR_JAMSTUDIO) }, |
1668 | { HID_USB_DEVICE(USB_VENDOR_ID_KWORLD, USB_DEVICE_ID_KWORLD_RADIO_FM700) }, | 1670 | { HID_USB_DEVICE(USB_VENDOR_ID_KWORLD, USB_DEVICE_ID_KWORLD_RADIO_FM700) }, |
1669 | { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_GPEN_560) }, | 1671 | { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_GPEN_560) }, |
diff --git a/drivers/hid/hid-debug.c b/drivers/hid/hid-debug.c index adff4efdc16..75c5e23d09d 100644 --- a/drivers/hid/hid-debug.c +++ b/drivers/hid/hid-debug.c | |||
@@ -1053,6 +1053,7 @@ static const struct file_operations hid_debug_events_fops = { | |||
1053 | .read = hid_debug_events_read, | 1053 | .read = hid_debug_events_read, |
1054 | .poll = hid_debug_events_poll, | 1054 | .poll = hid_debug_events_poll, |
1055 | .release = hid_debug_events_release, | 1055 | .release = hid_debug_events_release, |
1056 | .llseek = noop_llseek, | ||
1056 | }; | 1057 | }; |
1057 | 1058 | ||
1058 | 1059 | ||
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index 6033229a8c7..5247f5bdb49 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h | |||
@@ -135,6 +135,7 @@ | |||
135 | #define USB_VENDOR_ID_CANDO 0x2087 | 135 | #define USB_VENDOR_ID_CANDO 0x2087 |
136 | #define USB_DEVICE_ID_CANDO_MULTI_TOUCH 0x0a01 | 136 | #define USB_DEVICE_ID_CANDO_MULTI_TOUCH 0x0a01 |
137 | #define USB_DEVICE_ID_CANDO_MULTI_TOUCH_11_6 0x0b03 | 137 | #define USB_DEVICE_ID_CANDO_MULTI_TOUCH_11_6 0x0b03 |
138 | #define USB_DEVICE_ID_CANDO_MULTI_TOUCH_15_6 0x0f01 | ||
138 | 139 | ||
139 | #define USB_VENDOR_ID_CH 0x068e | 140 | #define USB_VENDOR_ID_CH 0x068e |
140 | #define USB_DEVICE_ID_CH_PRO_PEDALS 0x00f2 | 141 | #define USB_DEVICE_ID_CH_PRO_PEDALS 0x00f2 |
@@ -305,6 +306,9 @@ | |||
305 | #define USB_VENDOR_ID_IMATION 0x0718 | 306 | #define USB_VENDOR_ID_IMATION 0x0718 |
306 | #define USB_DEVICE_ID_DISC_STAKKA 0xd000 | 307 | #define USB_DEVICE_ID_DISC_STAKKA 0xd000 |
307 | 308 | ||
309 | #define USB_VENDOR_ID_JESS 0x0c45 | ||
310 | #define USB_DEVICE_ID_JESS_YUREX 0x1010 | ||
311 | |||
308 | #define USB_VENDOR_ID_KBGEAR 0x084e | 312 | #define USB_VENDOR_ID_KBGEAR 0x084e |
309 | #define USB_DEVICE_ID_KBGEAR_JAMSTUDIO 0x1001 | 313 | #define USB_DEVICE_ID_KBGEAR_JAMSTUDIO 0x1001 |
310 | 314 | ||
@@ -511,6 +515,7 @@ | |||
511 | 515 | ||
512 | #define USB_VENDOR_ID_TURBOX 0x062a | 516 | #define USB_VENDOR_ID_TURBOX 0x062a |
513 | #define USB_DEVICE_ID_TURBOX_KEYBOARD 0x0201 | 517 | #define USB_DEVICE_ID_TURBOX_KEYBOARD 0x0201 |
518 | #define USB_DEVICE_ID_TURBOX_TOUCHSCREEN_MOSART 0x7100 | ||
514 | 519 | ||
515 | #define USB_VENDOR_ID_TWINHAN 0x6253 | 520 | #define USB_VENDOR_ID_TWINHAN 0x6253 |
516 | #define USB_DEVICE_ID_TWINHAN_IR_REMOTE 0x0100 | 521 | #define USB_DEVICE_ID_TWINHAN_IR_REMOTE 0x0100 |
diff --git a/drivers/hid/hid-roccat.c b/drivers/hid/hid-roccat.c index f6e80c7ca61..5a6879e235a 100644 --- a/drivers/hid/hid-roccat.c +++ b/drivers/hid/hid-roccat.c | |||
@@ -384,6 +384,7 @@ static const struct file_operations roccat_ops = { | |||
384 | .poll = roccat_poll, | 384 | .poll = roccat_poll, |
385 | .open = roccat_open, | 385 | .open = roccat_open, |
386 | .release = roccat_release, | 386 | .release = roccat_release, |
387 | .llseek = noop_llseek, | ||
387 | }; | 388 | }; |
388 | 389 | ||
389 | static int __init roccat_init(void) | 390 | static int __init roccat_init(void) |
diff --git a/drivers/hid/hidraw.c b/drivers/hid/hidraw.c index 47d70c523d9..8a4b32dca9f 100644 --- a/drivers/hid/hidraw.c +++ b/drivers/hid/hidraw.c | |||
@@ -109,6 +109,12 @@ static ssize_t hidraw_write(struct file *file, const char __user *buffer, size_t | |||
109 | int ret = 0; | 109 | int ret = 0; |
110 | 110 | ||
111 | mutex_lock(&minors_lock); | 111 | mutex_lock(&minors_lock); |
112 | |||
113 | if (!hidraw_table[minor]) { | ||
114 | ret = -ENODEV; | ||
115 | goto out; | ||
116 | } | ||
117 | |||
112 | dev = hidraw_table[minor]->hid; | 118 | dev = hidraw_table[minor]->hid; |
113 | 119 | ||
114 | if (!dev->hid_output_raw_report) { | 120 | if (!dev->hid_output_raw_report) { |
@@ -212,9 +218,13 @@ static int hidraw_release(struct inode * inode, struct file * file) | |||
212 | unsigned int minor = iminor(inode); | 218 | unsigned int minor = iminor(inode); |
213 | struct hidraw *dev; | 219 | struct hidraw *dev; |
214 | struct hidraw_list *list = file->private_data; | 220 | struct hidraw_list *list = file->private_data; |
221 | int ret; | ||
215 | 222 | ||
216 | if (!hidraw_table[minor]) | 223 | mutex_lock(&minors_lock); |
217 | return -ENODEV; | 224 | if (!hidraw_table[minor]) { |
225 | ret = -ENODEV; | ||
226 | goto unlock; | ||
227 | } | ||
218 | 228 | ||
219 | list_del(&list->node); | 229 | list_del(&list->node); |
220 | dev = hidraw_table[minor]; | 230 | dev = hidraw_table[minor]; |
@@ -227,10 +237,12 @@ static int hidraw_release(struct inode * inode, struct file * file) | |||
227 | kfree(list->hidraw); | 237 | kfree(list->hidraw); |
228 | } | 238 | } |
229 | } | 239 | } |
230 | |||
231 | kfree(list); | 240 | kfree(list); |
241 | ret = 0; | ||
242 | unlock: | ||
243 | mutex_unlock(&minors_lock); | ||
232 | 244 | ||
233 | return 0; | 245 | return ret; |
234 | } | 246 | } |
235 | 247 | ||
236 | static long hidraw_ioctl(struct file *file, unsigned int cmd, | 248 | static long hidraw_ioctl(struct file *file, unsigned int cmd, |
@@ -244,6 +256,10 @@ static long hidraw_ioctl(struct file *file, unsigned int cmd, | |||
244 | 256 | ||
245 | mutex_lock(&minors_lock); | 257 | mutex_lock(&minors_lock); |
246 | dev = hidraw_table[minor]; | 258 | dev = hidraw_table[minor]; |
259 | if (!dev) { | ||
260 | ret = -ENODEV; | ||
261 | goto out; | ||
262 | } | ||
247 | 263 | ||
248 | switch (cmd) { | 264 | switch (cmd) { |
249 | case HIDIOCGRDESCSIZE: | 265 | case HIDIOCGRDESCSIZE: |
@@ -317,6 +333,7 @@ static long hidraw_ioctl(struct file *file, unsigned int cmd, | |||
317 | 333 | ||
318 | ret = -ENOTTY; | 334 | ret = -ENOTTY; |
319 | } | 335 | } |
336 | out: | ||
320 | mutex_unlock(&minors_lock); | 337 | mutex_unlock(&minors_lock); |
321 | return ret; | 338 | return ret; |
322 | } | 339 | } |
@@ -329,6 +346,7 @@ static const struct file_operations hidraw_ops = { | |||
329 | .open = hidraw_open, | 346 | .open = hidraw_open, |
330 | .release = hidraw_release, | 347 | .release = hidraw_release, |
331 | .unlocked_ioctl = hidraw_ioctl, | 348 | .unlocked_ioctl = hidraw_ioctl, |
349 | .llseek = noop_llseek, | ||
332 | }; | 350 | }; |
333 | 351 | ||
334 | void hidraw_report_event(struct hid_device *hid, u8 *data, int len) | 352 | void hidraw_report_event(struct hid_device *hid, u8 *data, int len) |
diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c index c52c36d0ca5..f90e937b577 100644 --- a/drivers/hid/usbhid/hid-quirks.c +++ b/drivers/hid/usbhid/hid-quirks.c | |||
@@ -36,6 +36,7 @@ static const struct hid_blacklist { | |||
36 | { USB_VENDOR_ID_DWAV, USB_DEVICE_ID_EGALAX_TOUCHCONTROLLER, HID_QUIRK_MULTI_INPUT | HID_QUIRK_NOGET }, | 36 | { USB_VENDOR_ID_DWAV, USB_DEVICE_ID_EGALAX_TOUCHCONTROLLER, HID_QUIRK_MULTI_INPUT | HID_QUIRK_NOGET }, |
37 | { USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH, HID_QUIRK_MULTI_INPUT }, | 37 | { USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH, HID_QUIRK_MULTI_INPUT }, |
38 | { USB_VENDOR_ID_MOJO, USB_DEVICE_ID_RETRO_ADAPTER, HID_QUIRK_MULTI_INPUT }, | 38 | { USB_VENDOR_ID_MOJO, USB_DEVICE_ID_RETRO_ADAPTER, HID_QUIRK_MULTI_INPUT }, |
39 | { USB_VENDOR_ID_TURBOX, USB_DEVICE_ID_TURBOX_TOUCHSCREEN_MOSART, HID_QUIRK_MULTI_INPUT }, | ||
39 | { USB_VENDOR_ID_HAPP, USB_DEVICE_ID_UGCI_DRIVING, HID_QUIRK_BADPAD | HID_QUIRK_MULTI_INPUT }, | 40 | { USB_VENDOR_ID_HAPP, USB_DEVICE_ID_UGCI_DRIVING, HID_QUIRK_BADPAD | HID_QUIRK_MULTI_INPUT }, |
40 | { USB_VENDOR_ID_HAPP, USB_DEVICE_ID_UGCI_FLYING, HID_QUIRK_BADPAD | HID_QUIRK_MULTI_INPUT }, | 41 | { USB_VENDOR_ID_HAPP, USB_DEVICE_ID_UGCI_FLYING, HID_QUIRK_BADPAD | HID_QUIRK_MULTI_INPUT }, |
41 | { USB_VENDOR_ID_HAPP, USB_DEVICE_ID_UGCI_FIGHTING, HID_QUIRK_BADPAD | HID_QUIRK_MULTI_INPUT }, | 42 | { USB_VENDOR_ID_HAPP, USB_DEVICE_ID_UGCI_FIGHTING, HID_QUIRK_BADPAD | HID_QUIRK_MULTI_INPUT }, |
diff --git a/drivers/hid/usbhid/hiddev.c b/drivers/hid/usbhid/hiddev.c index 19ed90c8f50..fedd88df9a1 100644 --- a/drivers/hid/usbhid/hiddev.c +++ b/drivers/hid/usbhid/hiddev.c | |||
@@ -845,6 +845,7 @@ static const struct file_operations hiddev_fops = { | |||
845 | #ifdef CONFIG_COMPAT | 845 | #ifdef CONFIG_COMPAT |
846 | .compat_ioctl = hiddev_compat_ioctl, | 846 | .compat_ioctl = hiddev_compat_ioctl, |
847 | #endif | 847 | #endif |
848 | .llseek = noop_llseek, | ||
848 | }; | 849 | }; |
849 | 850 | ||
850 | static char *hiddev_devnode(struct device *dev, mode_t *mode) | 851 | static char *hiddev_devnode(struct device *dev, mode_t *mode) |