aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/hid/hid-core.c9
-rw-r--r--drivers/hid/hid-cypress.c2
-rw-r--r--drivers/hid/hid-ids.h7
-rw-r--r--drivers/hid/hid-lg.c33
-rw-r--r--drivers/hid/usbhid/hid-core.c12
-rw-r--r--drivers/hid/usbhid/hid-pidff.c5
-rw-r--r--drivers/hid/usbhid/hid-quirks.c4
-rw-r--r--drivers/hid/usbhid/hiddev.c5
8 files changed, 60 insertions, 17 deletions
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 7d05c4bb201e..80792d38d25c 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -39,8 +39,6 @@
39 * Version Information 39 * Version Information
40 */ 40 */
41 41
42#define DRIVER_VERSION "v2.6"
43#define DRIVER_AUTHOR "Andreas Gal, Vojtech Pavlik, Jiri Kosina"
44#define DRIVER_DESC "HID core driver" 42#define DRIVER_DESC "HID core driver"
45#define DRIVER_LICENSE "GPL" 43#define DRIVER_LICENSE "GPL"
46 44
@@ -1294,6 +1292,7 @@ static const struct hid_device_id hid_blacklist[] = {
1294 { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_TACTICAL_PAD) }, 1292 { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_TACTICAL_PAD) },
1295 { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_1) }, 1293 { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_1) },
1296 { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_2) }, 1294 { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_2) },
1295 { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_3) },
1297 { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_MOUSE) }, 1296 { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_MOUSE) },
1298 { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, 0x0006) }, 1297 { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, 0x0006) },
1299 { HID_USB_DEVICE(USB_VENDOR_ID_EZKEY, USB_DEVICE_ID_BTC_8193) }, 1298 { HID_USB_DEVICE(USB_VENDOR_ID_EZKEY, USB_DEVICE_ID_BTC_8193) },
@@ -1326,6 +1325,8 @@ static const struct hid_device_id hid_blacklist[] = {
1326 { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_MOMO_WHEEL2) }, 1325 { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_MOMO_WHEEL2) },
1327 { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_G25_WHEEL) }, 1326 { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_G25_WHEEL) },
1328 { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_RUMBLEPAD2) }, 1327 { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_RUMBLEPAD2) },
1328 { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_SPACETRAVELLER) },
1329 { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_SPACENAVIGATOR) },
1329 { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_SIDEWINDER_GV) }, 1330 { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_SIDEWINDER_GV) },
1330 { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_NE4K) }, 1331 { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_NE4K) },
1331 { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_LK6K) }, 1332 { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_LK6K) },
@@ -1620,6 +1621,7 @@ static const struct hid_device_id hid_ignore_list[] = {
1620 { HID_USB_DEVICE(USB_VENDOR_ID_KBGEAR, USB_DEVICE_ID_KBGEAR_JAMSTUDIO) }, 1621 { HID_USB_DEVICE(USB_VENDOR_ID_KBGEAR, USB_DEVICE_ID_KBGEAR_JAMSTUDIO) },
1621 { HID_USB_DEVICE(USB_VENDOR_ID_KWORLD, USB_DEVICE_ID_KWORLD_RADIO_FM700) }, 1622 { HID_USB_DEVICE(USB_VENDOR_ID_KWORLD, USB_DEVICE_ID_KWORLD_RADIO_FM700) },
1622 { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_GPEN_560) }, 1623 { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_GPEN_560) },
1624 { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_KYE, 0x0058) },
1623 { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_CASSY) }, 1625 { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_CASSY) },
1624 { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_POCKETCASSY) }, 1626 { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_POCKETCASSY) },
1625 { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MOBILECASSY) }, 1627 { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MOBILECASSY) },
@@ -1918,5 +1920,8 @@ static void __exit hid_exit(void)
1918module_init(hid_init); 1920module_init(hid_init);
1919module_exit(hid_exit); 1921module_exit(hid_exit);
1920 1922
1923MODULE_AUTHOR("Andreas Gal");
1924MODULE_AUTHOR("Vojtech Pavlik");
1925MODULE_AUTHOR("Jiri Kosina");
1921MODULE_LICENSE(DRIVER_LICENSE); 1926MODULE_LICENSE(DRIVER_LICENSE);
1922 1927
diff --git a/drivers/hid/hid-cypress.c b/drivers/hid/hid-cypress.c
index 62e9cb10e88c..998b6f443d7d 100644
--- a/drivers/hid/hid-cypress.c
+++ b/drivers/hid/hid-cypress.c
@@ -126,6 +126,8 @@ static const struct hid_device_id cp_devices[] = {
126 .driver_data = CP_RDESC_SWAPPED_MIN_MAX }, 126 .driver_data = CP_RDESC_SWAPPED_MIN_MAX },
127 { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_2), 127 { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_2),
128 .driver_data = CP_RDESC_SWAPPED_MIN_MAX }, 128 .driver_data = CP_RDESC_SWAPPED_MIN_MAX },
129 { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_3),
130 .driver_data = CP_RDESC_SWAPPED_MIN_MAX },
129 { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_MOUSE), 131 { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_MOUSE),
130 .driver_data = CP_2WHEEL_MOUSE_HACK }, 132 .driver_data = CP_2WHEEL_MOUSE_HACK },
131 { } 133 { }
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index adbef5d069c4..3839340e293a 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -117,6 +117,7 @@
117#define USB_DEVICE_ID_CH_PRO_PEDALS 0x00f2 117#define USB_DEVICE_ID_CH_PRO_PEDALS 0x00f2
118#define USB_DEVICE_ID_CH_COMBATSTICK 0x00f4 118#define USB_DEVICE_ID_CH_COMBATSTICK 0x00f4
119#define USB_DEVICE_ID_CH_FLIGHT_SIM_YOKE 0x00ff 119#define USB_DEVICE_ID_CH_FLIGHT_SIM_YOKE 0x00ff
120#define USB_DEVICE_ID_CH_3AXIS_5BUTTON_STICK 0x00d3
120 121
121#define USB_VENDOR_ID_CHERRY 0x046a 122#define USB_VENDOR_ID_CHERRY 0x046a
122#define USB_DEVICE_ID_CHERRY_CYMOTION 0x0023 123#define USB_DEVICE_ID_CHERRY_CYMOTION 0x0023
@@ -145,6 +146,7 @@
145#define USB_DEVICE_ID_CYPRESS_ULTRAMOUSE 0x7417 146#define USB_DEVICE_ID_CYPRESS_ULTRAMOUSE 0x7417
146#define USB_DEVICE_ID_CYPRESS_BARCODE_1 0xde61 147#define USB_DEVICE_ID_CYPRESS_BARCODE_1 0xde61
147#define USB_DEVICE_ID_CYPRESS_BARCODE_2 0xde64 148#define USB_DEVICE_ID_CYPRESS_BARCODE_2 0xde64
149#define USB_DEVICE_ID_CYPRESS_BARCODE_3 0xbca1
148 150
149#define USB_VENDOR_ID_DEALEXTREAME 0x10c5 151#define USB_VENDOR_ID_DEALEXTREAME 0x10c5
150#define USB_DEVICE_ID_DEALEXTREAME_RADIO_SI4701 0x819a 152#define USB_DEVICE_ID_DEALEXTREAME_RADIO_SI4701 0x819a
@@ -304,6 +306,8 @@
304#define USB_DEVICE_ID_S510_RECEIVER_2 0xc517 306#define USB_DEVICE_ID_S510_RECEIVER_2 0xc517
305#define USB_DEVICE_ID_LOGITECH_CORDLESS_DESKTOP_LX500 0xc512 307#define USB_DEVICE_ID_LOGITECH_CORDLESS_DESKTOP_LX500 0xc512
306#define USB_DEVICE_ID_MX3000_RECEIVER 0xc513 308#define USB_DEVICE_ID_MX3000_RECEIVER 0xc513
309#define USB_DEVICE_ID_SPACETRAVELLER 0xc623
310#define USB_DEVICE_ID_SPACENAVIGATOR 0xc626
307#define USB_DEVICE_ID_DINOVO_DESKTOP 0xc704 311#define USB_DEVICE_ID_DINOVO_DESKTOP 0xc704
308#define USB_DEVICE_ID_DINOVO_EDGE 0xc714 312#define USB_DEVICE_ID_DINOVO_EDGE 0xc714
309#define USB_DEVICE_ID_DINOVO_MINI 0xc71f 313#define USB_DEVICE_ID_DINOVO_MINI 0xc71f
@@ -346,6 +350,9 @@
346#define USB_VENDOR_ID_NEC 0x073e 350#define USB_VENDOR_ID_NEC 0x073e
347#define USB_DEVICE_ID_NEC_USB_GAME_PAD 0x0301 351#define USB_DEVICE_ID_NEC_USB_GAME_PAD 0x0301
348 352
353#define USB_VENDOR_ID_NEXTWINDOW 0x1926
354#define USB_DEVICE_ID_NEXTWINDOW_TOUCHSCREEN 0x0003
355
349#define USB_VENDOR_ID_NTRIG 0x1b96 356#define USB_VENDOR_ID_NTRIG 0x1b96
350#define USB_DEVICE_ID_NTRIG_TOUCH_SCREEN 0x0001 357#define USB_DEVICE_ID_NTRIG_TOUCH_SCREEN 0x0001
351 358
diff --git a/drivers/hid/hid-lg.c b/drivers/hid/hid-lg.c
index 0f870a3243ed..9fcd3d017ab3 100644
--- a/drivers/hid/hid-lg.c
+++ b/drivers/hid/hid-lg.c
@@ -33,6 +33,7 @@
33#define LG_NOGET 0x100 33#define LG_NOGET 0x100
34#define LG_FF 0x200 34#define LG_FF 0x200
35#define LG_FF2 0x400 35#define LG_FF2 0x400
36#define LG_RDESC_REL_ABS 0x800
36 37
37/* 38/*
38 * Certain Logitech keyboards send in report #3 keys which are far 39 * Certain Logitech keyboards send in report #3 keys which are far
@@ -51,6 +52,13 @@ static void lg_report_fixup(struct hid_device *hdev, __u8 *rdesc,
51 rdesc[84] = rdesc[89] = 0x4d; 52 rdesc[84] = rdesc[89] = 0x4d;
52 rdesc[85] = rdesc[90] = 0x10; 53 rdesc[85] = rdesc[90] = 0x10;
53 } 54 }
55 if ((quirks & LG_RDESC_REL_ABS) && rsize >= 50 &&
56 rdesc[32] == 0x81 && rdesc[33] == 0x06 &&
57 rdesc[49] == 0x81 && rdesc[50] == 0x06) {
58 dev_info(&hdev->dev, "fixing up rel/abs in Logitech "
59 "report descriptor\n");
60 rdesc[33] = rdesc[50] = 0x02;
61 }
54} 62}
55 63
56#define lg_map_key_clear(c) hid_map_usage_clear(hi, usage, bit, max, \ 64#define lg_map_key_clear(c) hid_map_usage_clear(hi, usage, bit, max, \
@@ -89,6 +97,22 @@ static int lg_ultrax_remote_mapping(struct hid_input *hi,
89 return 1; 97 return 1;
90} 98}
91 99
100static int lg_dinovo_mapping(struct hid_input *hi, struct hid_usage *usage,
101 unsigned long **bit, int *max)
102{
103 if ((usage->hid & HID_USAGE_PAGE) != HID_UP_LOGIVENDOR)
104 return 0;
105
106 switch (usage->hid & HID_USAGE) {
107
108 case 0x00d: lg_map_key_clear(KEY_MEDIA); break;
109 default:
110 return 0;
111
112 }
113 return 1;
114}
115
92static int lg_wireless_mapping(struct hid_input *hi, struct hid_usage *usage, 116static int lg_wireless_mapping(struct hid_input *hi, struct hid_usage *usage,
93 unsigned long **bit, int *max) 117 unsigned long **bit, int *max)
94{ 118{
@@ -164,6 +188,10 @@ static int lg_input_mapping(struct hid_device *hdev, struct hid_input *hi,
164 lg_ultrax_remote_mapping(hi, usage, bit, max)) 188 lg_ultrax_remote_mapping(hi, usage, bit, max))
165 return 1; 189 return 1;
166 190
191 if (hdev->product == USB_DEVICE_ID_DINOVO_MINI &&
192 lg_dinovo_mapping(hi, usage, bit, max))
193 return 1;
194
167 if ((quirks & LG_WIRELESS) && lg_wireless_mapping(hi, usage, bit, max)) 195 if ((quirks & LG_WIRELESS) && lg_wireless_mapping(hi, usage, bit, max))
168 return 1; 196 return 1;
169 197
@@ -303,8 +331,13 @@ static const struct hid_device_id lg_devices[] = {
303 .driver_data = LG_FF }, 331 .driver_data = LG_FF },
304 { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_RUMBLEPAD2), 332 { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_RUMBLEPAD2),
305 .driver_data = LG_FF2 }, 333 .driver_data = LG_FF2 },
334 { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_SPACENAVIGATOR),
335 .driver_data = LG_RDESC_REL_ABS },
336 { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_SPACETRAVELLER),
337 .driver_data = LG_RDESC_REL_ABS },
306 { } 338 { }
307}; 339};
340
308MODULE_DEVICE_TABLE(hid, lg_devices); 341MODULE_DEVICE_TABLE(hid, lg_devices);
309 342
310static struct hid_driver lg_driver = { 343static struct hid_driver lg_driver = {
diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c
index 03bd703255a3..0258289f3b3e 100644
--- a/drivers/hid/usbhid/hid-core.c
+++ b/drivers/hid/usbhid/hid-core.c
@@ -41,8 +41,6 @@
41 * Version Information 41 * Version Information
42 */ 42 */
43 43
44#define DRIVER_VERSION "v2.6"
45#define DRIVER_AUTHOR "Andreas Gal, Vojtech Pavlik, Jiri Kosina"
46#define DRIVER_DESC "USB HID core driver" 44#define DRIVER_DESC "USB HID core driver"
47#define DRIVER_LICENSE "GPL" 45#define DRIVER_LICENSE "GPL"
48 46
@@ -998,7 +996,8 @@ static int usbhid_start(struct hid_device *hid)
998 usbhid->urbctrl->transfer_dma = usbhid->ctrlbuf_dma; 996 usbhid->urbctrl->transfer_dma = usbhid->ctrlbuf_dma;
999 usbhid->urbctrl->transfer_flags |= (URB_NO_TRANSFER_DMA_MAP | URB_NO_SETUP_DMA_MAP); 997 usbhid->urbctrl->transfer_flags |= (URB_NO_TRANSFER_DMA_MAP | URB_NO_SETUP_DMA_MAP);
1000 998
1001 usbhid_init_reports(hid); 999 if (!(hid->quirks & HID_QUIRK_NO_INIT_REPORTS))
1000 usbhid_init_reports(hid);
1002 1001
1003 set_bit(HID_STARTED, &usbhid->iofl); 1002 set_bit(HID_STARTED, &usbhid->iofl);
1004 1003
@@ -1395,8 +1394,7 @@ static int __init hid_init(void)
1395 retval = usb_register(&hid_driver); 1394 retval = usb_register(&hid_driver);
1396 if (retval) 1395 if (retval)
1397 goto usb_register_fail; 1396 goto usb_register_fail;
1398 printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" 1397 printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_DESC "\n");
1399 DRIVER_DESC "\n");
1400 1398
1401 return 0; 1399 return 0;
1402usb_register_fail: 1400usb_register_fail:
@@ -1423,6 +1421,8 @@ static void __exit hid_exit(void)
1423module_init(hid_init); 1421module_init(hid_init);
1424module_exit(hid_exit); 1422module_exit(hid_exit);
1425 1423
1426MODULE_AUTHOR(DRIVER_AUTHOR); 1424MODULE_AUTHOR("Andreas Gal");
1425MODULE_AUTHOR("Vojtech Pavlik");
1426MODULE_AUTHOR("Jiri Kosina");
1427MODULE_DESCRIPTION(DRIVER_DESC); 1427MODULE_DESCRIPTION(DRIVER_DESC);
1428MODULE_LICENSE(DRIVER_LICENSE); 1428MODULE_LICENSE(DRIVER_LICENSE);
diff --git a/drivers/hid/usbhid/hid-pidff.c b/drivers/hid/usbhid/hid-pidff.c
index 484e3eec2f88..e565dbe91d97 100644
--- a/drivers/hid/usbhid/hid-pidff.c
+++ b/drivers/hid/usbhid/hid-pidff.c
@@ -1181,12 +1181,11 @@ static void pidff_reset(struct pidff_device *pidff)
1181 usbhid_wait_io(hid); 1181 usbhid_wait_io(hid);
1182 1182
1183 if (pidff->pool[PID_SIMULTANEOUS_MAX].value) { 1183 if (pidff->pool[PID_SIMULTANEOUS_MAX].value) {
1184 int sim_effects = pidff->pool[PID_SIMULTANEOUS_MAX].value[0]; 1184 while (pidff->pool[PID_SIMULTANEOUS_MAX].value[0] < 2) {
1185 while (sim_effects < 2) {
1186 if (i++ > 20) { 1185 if (i++ > 20) {
1187 printk(KERN_WARNING "hid-pidff: device reports " 1186 printk(KERN_WARNING "hid-pidff: device reports "
1188 "%d simultaneous effects\n", 1187 "%d simultaneous effects\n",
1189 sim_effects); 1188 pidff->pool[PID_SIMULTANEOUS_MAX].value[0]);
1190 break; 1189 break;
1191 } 1190 }
1192 debug("pid_pool requested again"); 1191 debug("pid_pool requested again");
diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c
index 0d9045aa2c4b..38773dc2821b 100644
--- a/drivers/hid/usbhid/hid-quirks.c
+++ b/drivers/hid/usbhid/hid-quirks.c
@@ -37,6 +37,7 @@ static const struct hid_blacklist {
37 { USB_VENDOR_ID_HAPP, USB_DEVICE_ID_UGCI_FIGHTING, HID_QUIRK_BADPAD | HID_QUIRK_MULTI_INPUT }, 37 { USB_VENDOR_ID_HAPP, USB_DEVICE_ID_UGCI_FIGHTING, HID_QUIRK_BADPAD | HID_QUIRK_MULTI_INPUT },
38 { USB_VENDOR_ID_NATSU, USB_DEVICE_ID_NATSU_GAMEPAD, HID_QUIRK_BADPAD }, 38 { USB_VENDOR_ID_NATSU, USB_DEVICE_ID_NATSU_GAMEPAD, HID_QUIRK_BADPAD },
39 { USB_VENDOR_ID_NEC, USB_DEVICE_ID_NEC_USB_GAME_PAD, HID_QUIRK_BADPAD }, 39 { USB_VENDOR_ID_NEC, USB_DEVICE_ID_NEC_USB_GAME_PAD, HID_QUIRK_BADPAD },
40 { USB_VENDOR_ID_NEXTWINDOW, USB_DEVICE_ID_NEXTWINDOW_TOUCHSCREEN, HID_QUIRK_MULTI_INPUT},
40 { USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_RUMBLEPAD, HID_QUIRK_BADPAD }, 41 { USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_RUMBLEPAD, HID_QUIRK_BADPAD },
41 { USB_VENDOR_ID_TOPMAX, USB_DEVICE_ID_TOPMAX_COBRAPAD, HID_QUIRK_BADPAD }, 42 { USB_VENDOR_ID_TOPMAX, USB_DEVICE_ID_TOPMAX_COBRAPAD, HID_QUIRK_BADPAD },
42 43
@@ -53,6 +54,7 @@ static const struct hid_blacklist {
53 { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_COMBATSTICK, HID_QUIRK_NOGET }, 54 { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_COMBATSTICK, HID_QUIRK_NOGET },
54 { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_FLIGHT_SIM_YOKE, HID_QUIRK_NOGET }, 55 { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_FLIGHT_SIM_YOKE, HID_QUIRK_NOGET },
55 { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_PRO_PEDALS, HID_QUIRK_NOGET }, 56 { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_PRO_PEDALS, HID_QUIRK_NOGET },
57 { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_3AXIS_5BUTTON_STICK, HID_QUIRK_NOGET },
56 { USB_VENDOR_ID_DMI, USB_DEVICE_ID_DMI_ENC, HID_QUIRK_NOGET }, 58 { USB_VENDOR_ID_DMI, USB_DEVICE_ID_DMI_ENC, HID_QUIRK_NOGET },
57 { USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_TS2700, HID_QUIRK_NOGET }, 59 { USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_TS2700, HID_QUIRK_NOGET },
58 { USB_VENDOR_ID_SUN, USB_DEVICE_ID_RARITAN_KVM_DONGLE, HID_QUIRK_NOGET }, 60 { USB_VENDOR_ID_SUN, USB_DEVICE_ID_RARITAN_KVM_DONGLE, HID_QUIRK_NOGET },
@@ -280,7 +282,7 @@ u32 usbhid_lookup_quirk(const u16 idVendor, const u16 idProduct)
280 if (idVendor == USB_VENDOR_ID_NCR && 282 if (idVendor == USB_VENDOR_ID_NCR &&
281 idProduct >= USB_DEVICE_ID_NCR_FIRST && 283 idProduct >= USB_DEVICE_ID_NCR_FIRST &&
282 idProduct <= USB_DEVICE_ID_NCR_LAST) 284 idProduct <= USB_DEVICE_ID_NCR_LAST)
283 return HID_QUIRK_NOGET; 285 return HID_QUIRK_NO_INIT_REPORTS;
284 286
285 down_read(&dquirks_rwsem); 287 down_read(&dquirks_rwsem);
286 bl_entry = usbhid_exists_dquirk(idVendor, idProduct); 288 bl_entry = usbhid_exists_dquirk(idVendor, idProduct);
diff --git a/drivers/hid/usbhid/hiddev.c b/drivers/hid/usbhid/hiddev.c
index 8b6ee247bfe4..867e08433e4b 100644
--- a/drivers/hid/usbhid/hiddev.c
+++ b/drivers/hid/usbhid/hiddev.c
@@ -450,7 +450,6 @@ static noinline int hiddev_ioctl_usage(struct hiddev *hiddev, unsigned int cmd,
450 uref_multi = kmalloc(sizeof(struct hiddev_usage_ref_multi), GFP_KERNEL); 450 uref_multi = kmalloc(sizeof(struct hiddev_usage_ref_multi), GFP_KERNEL);
451 if (!uref_multi) 451 if (!uref_multi)
452 return -ENOMEM; 452 return -ENOMEM;
453 lock_kernel();
454 uref = &uref_multi->uref; 453 uref = &uref_multi->uref;
455 if (cmd == HIDIOCGUSAGES || cmd == HIDIOCSUSAGES) { 454 if (cmd == HIDIOCGUSAGES || cmd == HIDIOCSUSAGES) {
456 if (copy_from_user(uref_multi, user_arg, 455 if (copy_from_user(uref_multi, user_arg,
@@ -528,7 +527,6 @@ static noinline int hiddev_ioctl_usage(struct hiddev *hiddev, unsigned int cmd,
528 527
529 case HIDIOCGCOLLECTIONINDEX: 528 case HIDIOCGCOLLECTIONINDEX:
530 i = field->usage[uref->usage_index].collection_index; 529 i = field->usage[uref->usage_index].collection_index;
531 unlock_kernel();
532 kfree(uref_multi); 530 kfree(uref_multi);
533 return i; 531 return i;
534 case HIDIOCGUSAGES: 532 case HIDIOCGUSAGES:
@@ -547,15 +545,12 @@ static noinline int hiddev_ioctl_usage(struct hiddev *hiddev, unsigned int cmd,
547 } 545 }
548 546
549goodreturn: 547goodreturn:
550 unlock_kernel();
551 kfree(uref_multi); 548 kfree(uref_multi);
552 return 0; 549 return 0;
553fault: 550fault:
554 unlock_kernel();
555 kfree(uref_multi); 551 kfree(uref_multi);
556 return -EFAULT; 552 return -EFAULT;
557inval: 553inval:
558 unlock_kernel();
559 kfree(uref_multi); 554 kfree(uref_multi);
560 return -EINVAL; 555 return -EINVAL;
561 } 556 }