diff options
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/Kconfig | 1 | ||||
-rw-r--r-- | drivers/hid/hid-appleir.c | 3 | ||||
-rw-r--r-- | drivers/hid/hid-core.c | 2 | ||||
-rw-r--r-- | drivers/hid/hid-ids.h | 5 | ||||
-rw-r--r-- | drivers/hid/hid-kye.c | 14 | ||||
-rw-r--r-- | drivers/hid/hid-multitouch.c | 6 | ||||
-rw-r--r-- | drivers/hid/hid-sensor-hub.c | 22 | ||||
-rw-r--r-- | drivers/hid/hid-sony.c | 53 | ||||
-rw-r--r-- | drivers/hid/hid-wiimote-core.c | 5 | ||||
-rw-r--r-- | drivers/hid/uhid.c | 2 |
10 files changed, 83 insertions, 30 deletions
diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig index 329fbb9b5976..34e2d39d4ce8 100644 --- a/drivers/hid/Kconfig +++ b/drivers/hid/Kconfig | |||
@@ -460,6 +460,7 @@ config HID_MULTITOUCH | |||
460 | - Stantum multitouch panels | 460 | - Stantum multitouch panels |
461 | - Touch International Panels | 461 | - Touch International Panels |
462 | - Unitec Panels | 462 | - Unitec Panels |
463 | - Wistron optical touch panels | ||
463 | - XAT optical touch panels | 464 | - XAT optical touch panels |
464 | - Xiroku optical touch panels | 465 | - Xiroku optical touch panels |
465 | - Zytronic touch panels | 466 | - Zytronic touch panels |
diff --git a/drivers/hid/hid-appleir.c b/drivers/hid/hid-appleir.c index a42e6a394c5e..0e6a42d37eb6 100644 --- a/drivers/hid/hid-appleir.c +++ b/drivers/hid/hid-appleir.c | |||
@@ -297,6 +297,9 @@ static int appleir_probe(struct hid_device *hid, const struct hid_device_id *id) | |||
297 | 297 | ||
298 | appleir->hid = hid; | 298 | appleir->hid = hid; |
299 | 299 | ||
300 | /* force input as some remotes bypass the input registration */ | ||
301 | hid->quirks |= HID_QUIRK_HIDINPUT_FORCE; | ||
302 | |||
300 | spin_lock_init(&appleir->lock); | 303 | spin_lock_init(&appleir->lock); |
301 | setup_timer(&appleir->key_up_timer, | 304 | setup_timer(&appleir->key_up_timer, |
302 | key_up_tick, (unsigned long) appleir); | 305 | key_up_tick, (unsigned long) appleir); |
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 8c10f2742233..253fe23ef7fe 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c | |||
@@ -1723,6 +1723,7 @@ static const struct hid_device_id hid_have_special_driver[] = { | |||
1723 | { HID_USB_DEVICE(USB_VENDOR_ID_KENSINGTON, USB_DEVICE_ID_KS_SLIMBLADE) }, | 1723 | { HID_USB_DEVICE(USB_VENDOR_ID_KENSINGTON, USB_DEVICE_ID_KS_SLIMBLADE) }, |
1724 | { HID_USB_DEVICE(USB_VENDOR_ID_KEYTOUCH, USB_DEVICE_ID_KEYTOUCH_IEC) }, | 1724 | { HID_USB_DEVICE(USB_VENDOR_ID_KEYTOUCH, USB_DEVICE_ID_KEYTOUCH_IEC) }, |
1725 | { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_GENIUS_GILA_GAMING_MOUSE) }, | 1725 | { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_GENIUS_GILA_GAMING_MOUSE) }, |
1726 | { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_GENIUS_MANTICORE) }, | ||
1726 | { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_GENIUS_GX_IMPERATOR) }, | 1727 | { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_GENIUS_GX_IMPERATOR) }, |
1727 | { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_ERGO_525V) }, | 1728 | { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_ERGO_525V) }, |
1728 | { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_EASYPEN_I405X) }, | 1729 | { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_EASYPEN_I405X) }, |
@@ -1879,7 +1880,6 @@ static const struct hid_device_id hid_have_special_driver[] = { | |||
1879 | 1880 | ||
1880 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_PRESENTER_8K_BT) }, | 1881 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_PRESENTER_8K_BT) }, |
1881 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_NINTENDO, USB_DEVICE_ID_NINTENDO_WIIMOTE) }, | 1882 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_NINTENDO, USB_DEVICE_ID_NINTENDO_WIIMOTE) }, |
1882 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_NINTENDO2, USB_DEVICE_ID_NINTENDO_WIIMOTE) }, | ||
1883 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_NINTENDO, USB_DEVICE_ID_NINTENDO_WIIMOTE2) }, | 1883 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_NINTENDO, USB_DEVICE_ID_NINTENDO_WIIMOTE2) }, |
1884 | { } | 1884 | { } |
1885 | }; | 1885 | }; |
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index 76559629568c..f9304cb37154 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h | |||
@@ -489,6 +489,7 @@ | |||
489 | #define USB_VENDOR_ID_KYE 0x0458 | 489 | #define USB_VENDOR_ID_KYE 0x0458 |
490 | #define USB_DEVICE_ID_KYE_ERGO_525V 0x0087 | 490 | #define USB_DEVICE_ID_KYE_ERGO_525V 0x0087 |
491 | #define USB_DEVICE_ID_GENIUS_GILA_GAMING_MOUSE 0x0138 | 491 | #define USB_DEVICE_ID_GENIUS_GILA_GAMING_MOUSE 0x0138 |
492 | #define USB_DEVICE_ID_GENIUS_MANTICORE 0x0153 | ||
492 | #define USB_DEVICE_ID_GENIUS_GX_IMPERATOR 0x4018 | 493 | #define USB_DEVICE_ID_GENIUS_GX_IMPERATOR 0x4018 |
493 | #define USB_DEVICE_ID_KYE_GPEN_560 0x5003 | 494 | #define USB_DEVICE_ID_KYE_GPEN_560 0x5003 |
494 | #define USB_DEVICE_ID_KYE_EASYPEN_I405X 0x5010 | 495 | #define USB_DEVICE_ID_KYE_EASYPEN_I405X 0x5010 |
@@ -640,7 +641,6 @@ | |||
640 | #define USB_DEVICE_ID_NEXTWINDOW_TOUCHSCREEN 0x0003 | 641 | #define USB_DEVICE_ID_NEXTWINDOW_TOUCHSCREEN 0x0003 |
641 | 642 | ||
642 | #define USB_VENDOR_ID_NINTENDO 0x057e | 643 | #define USB_VENDOR_ID_NINTENDO 0x057e |
643 | #define USB_VENDOR_ID_NINTENDO2 0x054c | ||
644 | #define USB_DEVICE_ID_NINTENDO_WIIMOTE 0x0306 | 644 | #define USB_DEVICE_ID_NINTENDO_WIIMOTE 0x0306 |
645 | #define USB_DEVICE_ID_NINTENDO_WIIMOTE2 0x0330 | 645 | #define USB_DEVICE_ID_NINTENDO_WIIMOTE2 0x0330 |
646 | 646 | ||
@@ -902,6 +902,9 @@ | |||
902 | #define USB_DEVICE_ID_SUPER_DUAL_BOX_PRO 0x8802 | 902 | #define USB_DEVICE_ID_SUPER_DUAL_BOX_PRO 0x8802 |
903 | #define USB_DEVICE_ID_SUPER_JOY_BOX_5_PRO 0x8804 | 903 | #define USB_DEVICE_ID_SUPER_JOY_BOX_5_PRO 0x8804 |
904 | 904 | ||
905 | #define USB_VENDOR_ID_WISTRON 0x0fb8 | ||
906 | #define USB_DEVICE_ID_WISTRON_OPTICAL_TOUCH 0x1109 | ||
907 | |||
905 | #define USB_VENDOR_ID_X_TENSIONS 0x1ae7 | 908 | #define USB_VENDOR_ID_X_TENSIONS 0x1ae7 |
906 | #define USB_DEVICE_ID_SPEEDLINK_VAD_CEZANNE 0x9001 | 909 | #define USB_DEVICE_ID_SPEEDLINK_VAD_CEZANNE 0x9001 |
907 | 910 | ||
diff --git a/drivers/hid/hid-kye.c b/drivers/hid/hid-kye.c index 73845120295e..e77696367591 100644 --- a/drivers/hid/hid-kye.c +++ b/drivers/hid/hid-kye.c | |||
@@ -342,6 +342,10 @@ static __u8 *kye_report_fixup(struct hid_device *hdev, __u8 *rdesc, | |||
342 | rdesc = kye_consumer_control_fixup(hdev, rdesc, rsize, 83, | 342 | rdesc = kye_consumer_control_fixup(hdev, rdesc, rsize, 83, |
343 | "Genius Gx Imperator Keyboard"); | 343 | "Genius Gx Imperator Keyboard"); |
344 | break; | 344 | break; |
345 | case USB_DEVICE_ID_GENIUS_MANTICORE: | ||
346 | rdesc = kye_consumer_control_fixup(hdev, rdesc, rsize, 104, | ||
347 | "Genius Manticore Keyboard"); | ||
348 | break; | ||
345 | } | 349 | } |
346 | return rdesc; | 350 | return rdesc; |
347 | } | 351 | } |
@@ -418,6 +422,14 @@ static int kye_probe(struct hid_device *hdev, const struct hid_device_id *id) | |||
418 | goto enabling_err; | 422 | goto enabling_err; |
419 | } | 423 | } |
420 | break; | 424 | break; |
425 | case USB_DEVICE_ID_GENIUS_MANTICORE: | ||
426 | /* | ||
427 | * The manticore keyboard needs to have all the interfaces | ||
428 | * opened at least once to be fully functional. | ||
429 | */ | ||
430 | if (hid_hw_open(hdev)) | ||
431 | hid_hw_close(hdev); | ||
432 | break; | ||
421 | } | 433 | } |
422 | 434 | ||
423 | return 0; | 435 | return 0; |
@@ -439,6 +451,8 @@ static const struct hid_device_id kye_devices[] = { | |||
439 | USB_DEVICE_ID_GENIUS_GILA_GAMING_MOUSE) }, | 451 | USB_DEVICE_ID_GENIUS_GILA_GAMING_MOUSE) }, |
440 | { HID_USB_DEVICE(USB_VENDOR_ID_KYE, | 452 | { HID_USB_DEVICE(USB_VENDOR_ID_KYE, |
441 | USB_DEVICE_ID_GENIUS_GX_IMPERATOR) }, | 453 | USB_DEVICE_ID_GENIUS_GX_IMPERATOR) }, |
454 | { HID_USB_DEVICE(USB_VENDOR_ID_KYE, | ||
455 | USB_DEVICE_ID_GENIUS_MANTICORE) }, | ||
442 | { } | 456 | { } |
443 | }; | 457 | }; |
444 | MODULE_DEVICE_TABLE(hid, kye_devices); | 458 | MODULE_DEVICE_TABLE(hid, kye_devices); |
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c index a2cedb8ae1c0..d83b1e8b505b 100644 --- a/drivers/hid/hid-multitouch.c +++ b/drivers/hid/hid-multitouch.c | |||
@@ -1335,6 +1335,12 @@ static const struct hid_device_id mt_devices[] = { | |||
1335 | { .driver_data = MT_CLS_NSMU, | 1335 | { .driver_data = MT_CLS_NSMU, |
1336 | MT_USB_DEVICE(USB_VENDOR_ID_UNITEC, | 1336 | MT_USB_DEVICE(USB_VENDOR_ID_UNITEC, |
1337 | USB_DEVICE_ID_UNITEC_USB_TOUCH_0A19) }, | 1337 | USB_DEVICE_ID_UNITEC_USB_TOUCH_0A19) }, |
1338 | |||
1339 | /* Wistron panels */ | ||
1340 | { .driver_data = MT_CLS_NSMU, | ||
1341 | MT_USB_DEVICE(USB_VENDOR_ID_WISTRON, | ||
1342 | USB_DEVICE_ID_WISTRON_OPTICAL_TOUCH) }, | ||
1343 | |||
1338 | /* XAT */ | 1344 | /* XAT */ |
1339 | { .driver_data = MT_CLS_NSMU, | 1345 | { .driver_data = MT_CLS_NSMU, |
1340 | MT_USB_DEVICE(USB_VENDOR_ID_XAT, | 1346 | MT_USB_DEVICE(USB_VENDOR_ID_XAT, |
diff --git a/drivers/hid/hid-sensor-hub.c b/drivers/hid/hid-sensor-hub.c index a184e1921c11..8fab82829f8b 100644 --- a/drivers/hid/hid-sensor-hub.c +++ b/drivers/hid/hid-sensor-hub.c | |||
@@ -112,13 +112,15 @@ static int sensor_hub_get_physical_device_count( | |||
112 | 112 | ||
113 | static void sensor_hub_fill_attr_info( | 113 | static void sensor_hub_fill_attr_info( |
114 | struct hid_sensor_hub_attribute_info *info, | 114 | struct hid_sensor_hub_attribute_info *info, |
115 | s32 index, s32 report_id, s32 units, s32 unit_expo, s32 size) | 115 | s32 index, s32 report_id, struct hid_field *field) |
116 | { | 116 | { |
117 | info->index = index; | 117 | info->index = index; |
118 | info->report_id = report_id; | 118 | info->report_id = report_id; |
119 | info->units = units; | 119 | info->units = field->unit; |
120 | info->unit_expo = unit_expo; | 120 | info->unit_expo = field->unit_exponent; |
121 | info->size = size/8; | 121 | info->size = (field->report_size * field->report_count)/8; |
122 | info->logical_minimum = field->logical_minimum; | ||
123 | info->logical_maximum = field->logical_maximum; | ||
122 | } | 124 | } |
123 | 125 | ||
124 | static struct hid_sensor_hub_callbacks *sensor_hub_get_callback( | 126 | static struct hid_sensor_hub_callbacks *sensor_hub_get_callback( |
@@ -325,9 +327,7 @@ int sensor_hub_input_get_attribute_info(struct hid_sensor_hub_device *hsdev, | |||
325 | if (field->physical == usage_id && | 327 | if (field->physical == usage_id && |
326 | field->logical == attr_usage_id) { | 328 | field->logical == attr_usage_id) { |
327 | sensor_hub_fill_attr_info(info, i, report->id, | 329 | sensor_hub_fill_attr_info(info, i, report->id, |
328 | field->unit, field->unit_exponent, | 330 | field); |
329 | field->report_size * | ||
330 | field->report_count); | ||
331 | ret = 0; | 331 | ret = 0; |
332 | } else { | 332 | } else { |
333 | for (j = 0; j < field->maxusage; ++j) { | 333 | for (j = 0; j < field->maxusage; ++j) { |
@@ -336,11 +336,7 @@ int sensor_hub_input_get_attribute_info(struct hid_sensor_hub_device *hsdev, | |||
336 | field->usage[j].collection_index == | 336 | field->usage[j].collection_index == |
337 | collection_index) { | 337 | collection_index) { |
338 | sensor_hub_fill_attr_info(info, | 338 | sensor_hub_fill_attr_info(info, |
339 | i, report->id, | 339 | i, report->id, field); |
340 | field->unit, | ||
341 | field->unit_exponent, | ||
342 | field->report_size * | ||
343 | field->report_count); | ||
344 | ret = 0; | 340 | ret = 0; |
345 | break; | 341 | break; |
346 | } | 342 | } |
@@ -573,6 +569,8 @@ static int sensor_hub_probe(struct hid_device *hdev, | |||
573 | goto err_free_names; | 569 | goto err_free_names; |
574 | } | 570 | } |
575 | sd->hid_sensor_hub_client_devs[ | 571 | sd->hid_sensor_hub_client_devs[ |
572 | sd->hid_sensor_client_cnt].id = PLATFORM_DEVID_AUTO; | ||
573 | sd->hid_sensor_hub_client_devs[ | ||
576 | sd->hid_sensor_client_cnt].name = name; | 574 | sd->hid_sensor_client_cnt].name = name; |
577 | sd->hid_sensor_hub_client_devs[ | 575 | sd->hid_sensor_hub_client_devs[ |
578 | sd->hid_sensor_client_cnt].platform_data = | 576 | sd->hid_sensor_client_cnt].platform_data = |
diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c index da551d113762..098af2f84b8c 100644 --- a/drivers/hid/hid-sony.c +++ b/drivers/hid/hid-sony.c | |||
@@ -225,6 +225,13 @@ static const unsigned int buzz_keymap[] = { | |||
225 | struct sony_sc { | 225 | struct sony_sc { |
226 | unsigned long quirks; | 226 | unsigned long quirks; |
227 | 227 | ||
228 | #ifdef CONFIG_SONY_FF | ||
229 | struct work_struct rumble_worker; | ||
230 | struct hid_device *hdev; | ||
231 | __u8 left; | ||
232 | __u8 right; | ||
233 | #endif | ||
234 | |||
228 | void *extra; | 235 | void *extra; |
229 | }; | 236 | }; |
230 | 237 | ||
@@ -615,9 +622,9 @@ static void buzz_remove(struct hid_device *hdev) | |||
615 | } | 622 | } |
616 | 623 | ||
617 | #ifdef CONFIG_SONY_FF | 624 | #ifdef CONFIG_SONY_FF |
618 | static int sony_play_effect(struct input_dev *dev, void *data, | 625 | static void sony_rumble_worker(struct work_struct *work) |
619 | struct ff_effect *effect) | ||
620 | { | 626 | { |
627 | struct sony_sc *sc = container_of(work, struct sony_sc, rumble_worker); | ||
621 | unsigned char buf[] = { | 628 | unsigned char buf[] = { |
622 | 0x01, | 629 | 0x01, |
623 | 0x00, 0xff, 0x00, 0xff, 0x00, | 630 | 0x00, 0xff, 0x00, 0xff, 0x00, |
@@ -628,21 +635,28 @@ static int sony_play_effect(struct input_dev *dev, void *data, | |||
628 | 0xff, 0x27, 0x10, 0x00, 0x32, | 635 | 0xff, 0x27, 0x10, 0x00, 0x32, |
629 | 0x00, 0x00, 0x00, 0x00, 0x00 | 636 | 0x00, 0x00, 0x00, 0x00, 0x00 |
630 | }; | 637 | }; |
631 | __u8 left; | 638 | |
632 | __u8 right; | 639 | buf[3] = sc->right; |
640 | buf[5] = sc->left; | ||
641 | |||
642 | sc->hdev->hid_output_raw_report(sc->hdev, buf, sizeof(buf), | ||
643 | HID_OUTPUT_REPORT); | ||
644 | } | ||
645 | |||
646 | static int sony_play_effect(struct input_dev *dev, void *data, | ||
647 | struct ff_effect *effect) | ||
648 | { | ||
633 | struct hid_device *hid = input_get_drvdata(dev); | 649 | struct hid_device *hid = input_get_drvdata(dev); |
650 | struct sony_sc *sc = hid_get_drvdata(hid); | ||
634 | 651 | ||
635 | if (effect->type != FF_RUMBLE) | 652 | if (effect->type != FF_RUMBLE) |
636 | return 0; | 653 | return 0; |
637 | 654 | ||
638 | left = effect->u.rumble.strong_magnitude / 256; | 655 | sc->left = effect->u.rumble.strong_magnitude / 256; |
639 | right = effect->u.rumble.weak_magnitude ? 1 : 0; | 656 | sc->right = effect->u.rumble.weak_magnitude ? 1 : 0; |
640 | |||
641 | buf[3] = right; | ||
642 | buf[5] = left; | ||
643 | 657 | ||
644 | return hid->hid_output_raw_report(hid, buf, sizeof(buf), | 658 | schedule_work(&sc->rumble_worker); |
645 | HID_OUTPUT_REPORT); | 659 | return 0; |
646 | } | 660 | } |
647 | 661 | ||
648 | static int sony_init_ff(struct hid_device *hdev) | 662 | static int sony_init_ff(struct hid_device *hdev) |
@@ -650,16 +664,31 @@ static int sony_init_ff(struct hid_device *hdev) | |||
650 | struct hid_input *hidinput = list_entry(hdev->inputs.next, | 664 | struct hid_input *hidinput = list_entry(hdev->inputs.next, |
651 | struct hid_input, list); | 665 | struct hid_input, list); |
652 | struct input_dev *input_dev = hidinput->input; | 666 | struct input_dev *input_dev = hidinput->input; |
667 | struct sony_sc *sc = hid_get_drvdata(hdev); | ||
668 | |||
669 | sc->hdev = hdev; | ||
670 | INIT_WORK(&sc->rumble_worker, sony_rumble_worker); | ||
653 | 671 | ||
654 | input_set_capability(input_dev, EV_FF, FF_RUMBLE); | 672 | input_set_capability(input_dev, EV_FF, FF_RUMBLE); |
655 | return input_ff_create_memless(input_dev, NULL, sony_play_effect); | 673 | return input_ff_create_memless(input_dev, NULL, sony_play_effect); |
656 | } | 674 | } |
657 | 675 | ||
676 | static void sony_destroy_ff(struct hid_device *hdev) | ||
677 | { | ||
678 | struct sony_sc *sc = hid_get_drvdata(hdev); | ||
679 | |||
680 | cancel_work_sync(&sc->rumble_worker); | ||
681 | } | ||
682 | |||
658 | #else | 683 | #else |
659 | static int sony_init_ff(struct hid_device *hdev) | 684 | static int sony_init_ff(struct hid_device *hdev) |
660 | { | 685 | { |
661 | return 0; | 686 | return 0; |
662 | } | 687 | } |
688 | |||
689 | static void sony_destroy_ff(struct hid_device *hdev) | ||
690 | { | ||
691 | } | ||
663 | #endif | 692 | #endif |
664 | 693 | ||
665 | static int sony_probe(struct hid_device *hdev, const struct hid_device_id *id) | 694 | static int sony_probe(struct hid_device *hdev, const struct hid_device_id *id) |
@@ -728,6 +757,8 @@ static void sony_remove(struct hid_device *hdev) | |||
728 | if (sc->quirks & BUZZ_CONTROLLER) | 757 | if (sc->quirks & BUZZ_CONTROLLER) |
729 | buzz_remove(hdev); | 758 | buzz_remove(hdev); |
730 | 759 | ||
760 | sony_destroy_ff(hdev); | ||
761 | |||
731 | hid_hw_stop(hdev); | 762 | hid_hw_stop(hdev); |
732 | } | 763 | } |
733 | 764 | ||
diff --git a/drivers/hid/hid-wiimote-core.c b/drivers/hid/hid-wiimote-core.c index 1446f526ee8b..abb20db2b443 100644 --- a/drivers/hid/hid-wiimote-core.c +++ b/drivers/hid/hid-wiimote-core.c | |||
@@ -834,8 +834,7 @@ static void wiimote_init_set_type(struct wiimote_data *wdata, | |||
834 | goto done; | 834 | goto done; |
835 | } | 835 | } |
836 | 836 | ||
837 | if (vendor == USB_VENDOR_ID_NINTENDO || | 837 | if (vendor == USB_VENDOR_ID_NINTENDO) { |
838 | vendor == USB_VENDOR_ID_NINTENDO2) { | ||
839 | if (product == USB_DEVICE_ID_NINTENDO_WIIMOTE) { | 838 | if (product == USB_DEVICE_ID_NINTENDO_WIIMOTE) { |
840 | devtype = WIIMOTE_DEV_GEN10; | 839 | devtype = WIIMOTE_DEV_GEN10; |
841 | goto done; | 840 | goto done; |
@@ -1856,8 +1855,6 @@ static void wiimote_hid_remove(struct hid_device *hdev) | |||
1856 | static const struct hid_device_id wiimote_hid_devices[] = { | 1855 | static const struct hid_device_id wiimote_hid_devices[] = { |
1857 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_NINTENDO, | 1856 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_NINTENDO, |
1858 | USB_DEVICE_ID_NINTENDO_WIIMOTE) }, | 1857 | USB_DEVICE_ID_NINTENDO_WIIMOTE) }, |
1859 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_NINTENDO2, | ||
1860 | USB_DEVICE_ID_NINTENDO_WIIMOTE) }, | ||
1861 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_NINTENDO, | 1858 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_NINTENDO, |
1862 | USB_DEVICE_ID_NINTENDO_WIIMOTE2) }, | 1859 | USB_DEVICE_ID_NINTENDO_WIIMOTE2) }, |
1863 | { } | 1860 | { } |
diff --git a/drivers/hid/uhid.c b/drivers/hid/uhid.c index 93b00d76374c..cedc6da93c19 100644 --- a/drivers/hid/uhid.c +++ b/drivers/hid/uhid.c | |||
@@ -287,7 +287,7 @@ static int uhid_event_from_user(const char __user *buffer, size_t len, | |||
287 | */ | 287 | */ |
288 | struct uhid_create_req_compat *compat; | 288 | struct uhid_create_req_compat *compat; |
289 | 289 | ||
290 | compat = kmalloc(sizeof(*compat), GFP_KERNEL); | 290 | compat = kzalloc(sizeof(*compat), GFP_KERNEL); |
291 | if (!compat) | 291 | if (!compat) |
292 | return -ENOMEM; | 292 | return -ENOMEM; |
293 | 293 | ||