Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jikos/hid

* 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jikos/hid:
HID: fix pb_fnmode and move it to generic HID
HID: fix hid-input mapping for Firefly Mini Remote Control
USB HID: fix hid_blacklist clash for 0x08ca/0x0010
HID: fix memleaking of collection

+11 -16
+1
drivers/hid/hid-core.c
··· 543 543 } 544 544 545 545 kfree(device->rdesc); 546 + kfree(device->collection); 546 547 kfree(device); 547 548 } 548 549 EXPORT_SYMBOL_GPL(hid_free_device);
+10 -3
drivers/hid/hid-input.c
··· 35 35 36 36 #include <linux/hid.h> 37 37 38 + static int hid_pb_fnmode = 1; 39 + module_param_named(pb_fnmode, hid_pb_fnmode, int, 0644); 40 + MODULE_PARM_DESC(pb_fnmode, 41 + "Mode of fn key on PowerBooks (0 = disabled, 1 = fkeyslast, 2 = fkeysfirst)"); 42 + 38 43 #define unk KEY_UNKNOWN 39 44 40 45 static const unsigned char hid_keyboard[256] = { ··· 159 154 return 1; 160 155 } 161 156 162 - if (hid->pb_fnmode) { 157 + if (hid_pb_fnmode) { 163 158 int do_translate; 164 159 165 160 trans = find_translation(powerbook_fn_keys, usage->code); ··· 168 163 do_translate = 1; 169 164 else if (trans->flags & POWERBOOK_FLAG_FKEY) 170 165 do_translate = 171 - (hid->pb_fnmode == 2 && (hid->quirks & HID_QUIRK_POWERBOOK_FN_ON)) || 172 - (hid->pb_fnmode == 1 && !(hid->quirks & HID_QUIRK_POWERBOOK_FN_ON)); 166 + (hid_pb_fnmode == 2 && (hid->quirks & HID_QUIRK_POWERBOOK_FN_ON)) || 167 + (hid_pb_fnmode == 1 && !(hid->quirks & HID_QUIRK_POWERBOOK_FN_ON)); 173 168 else 174 169 do_translate = (hid->quirks & HID_QUIRK_POWERBOOK_FN_ON); 175 170 ··· 436 431 case 0x040: map_key_clear(KEY_MENU); break; 437 432 case 0x045: map_key_clear(KEY_RADIO); break; 438 433 434 + case 0x083: map_key_clear(KEY_LAST); break; 439 435 case 0x088: map_key_clear(KEY_PC); break; 440 436 case 0x089: map_key_clear(KEY_TV); break; 441 437 case 0x08a: map_key_clear(KEY_WWW); break; ··· 454 448 case 0x096: map_key_clear(KEY_TAPE); break; 455 449 case 0x097: map_key_clear(KEY_TV2); break; 456 450 case 0x098: map_key_clear(KEY_SAT); break; 451 + case 0x09a: map_key_clear(KEY_PVR); break; 457 452 458 453 case 0x09c: map_key_clear(KEY_CHANNELUP); break; 459 454 case 0x09d: map_key_clear(KEY_CHANNELDOWN); break;
-12
drivers/usb/input/hid-core.c
··· 56 56 module_param_named(mousepoll, hid_mousepoll_interval, uint, 0644); 57 57 MODULE_PARM_DESC(mousepoll, "Polling interval of mice"); 58 58 59 - static int usbhid_pb_fnmode = 1; 60 - module_param_named(pb_fnmode, usbhid_pb_fnmode, int, 0644); 61 - MODULE_PARM_DESC(pb_fnmode, 62 - "Mode of fn key on PowerBooks (0 = disabled, 1 = fkeyslast, 2 = fkeysfirst)"); 63 - 64 59 /* 65 60 * Input submission and I/O error handler. 66 61 */ ··· 577 582 } 578 583 579 584 #define USB_VENDOR_ID_GTCO 0x078c 580 - #define USB_VENDOR_ID_GTCO_IPANEL_1 0x08ca 581 585 #define USB_VENDOR_ID_GTCO_IPANEL_2 0x5543 582 586 #define USB_DEVICE_ID_GTCO_90 0x0090 583 587 #define USB_DEVICE_ID_GTCO_100 0x0100 ··· 623 629 #define USB_DEVICE_ID_GTCO_1004 0x1004 624 630 #define USB_DEVICE_ID_GTCO_1005 0x1005 625 631 #define USB_DEVICE_ID_GTCO_1006 0x1006 626 - #define USB_DEVICE_ID_GTCO_10 0x0010 627 632 #define USB_DEVICE_ID_GTCO_8 0x0008 628 633 #define USB_DEVICE_ID_GTCO_d 0x000d 629 634 ··· 876 883 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1004, HID_QUIRK_IGNORE }, 877 884 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1005, HID_QUIRK_IGNORE }, 878 885 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1006, HID_QUIRK_IGNORE }, 879 - { USB_VENDOR_ID_GTCO_IPANEL_1, USB_DEVICE_ID_GTCO_10, HID_QUIRK_IGNORE }, 880 886 { USB_VENDOR_ID_GTCO_IPANEL_2, USB_DEVICE_ID_GTCO_8, HID_QUIRK_IGNORE }, 881 887 { USB_VENDOR_ID_GTCO_IPANEL_2, USB_DEVICE_ID_GTCO_d, HID_QUIRK_IGNORE }, 882 888 { USB_VENDOR_ID_IMATION, USB_DEVICE_ID_DISC_STAKKA, HID_QUIRK_IGNORE }, ··· 1241 1249 hid->hiddev_hid_event = hiddev_hid_event; 1242 1250 hid->hiddev_report_event = hiddev_report_event; 1243 1251 #endif 1244 - #ifdef CONFIG_USB_HIDINPUT_POWERBOOK 1245 - hid->pb_fnmode = usbhid_pb_fnmode; 1246 - #endif 1247 - 1248 1252 return hid; 1249 1253 1250 1254 fail:
-1
include/linux/hid.h
··· 438 438 struct hid_usage *, __s32); 439 439 void (*hiddev_report_event) (struct hid_device *, struct hid_report *); 440 440 #ifdef CONFIG_USB_HIDINPUT_POWERBOOK 441 - unsigned int pb_fnmode; 442 441 unsigned long pb_pressed_fn[NBITS(KEY_MAX)]; 443 442 unsigned long pb_pressed_numlock[NBITS(KEY_MAX)]; 444 443 #endif