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

HID: redragon: fix num lock and caps lock LEDs

The redragon asura keyboard registers two input devices. The initial commit
85455dd906d5 ("HID: redragon: Fix modifier keys for Redragon Asura Keyboard")
considered this an error and prevented one of the devices from registering.
However, once this is done the num lock and caps lock leds no longer toggle on
and off, although the key functionality is not affected.

This commit removes the code that prevents the input device
registration and restores the num lock and caps lock LEDs.

Fixes: 85455dd906d5 ("HID: redragon: Fix modifier keys for Redragon Asura Keyboard")
Signed-off-by: Robert Munteanu <rombert@apache.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>

authored by

Robert Munteanu and committed by
Jiri Kosina
dc9b8e85 44d4d51d

+1 -25
+1 -25
drivers/hid/hid-redragon.c
··· 44 44 return rdesc; 45 45 } 46 46 47 - static int redragon_probe(struct hid_device *dev, 48 - const struct hid_device_id *id) 49 - { 50 - int ret; 51 - 52 - ret = hid_parse(dev); 53 - if (ret) { 54 - hid_err(dev, "parse failed\n"); 55 - return ret; 56 - } 57 - 58 - /* do not register unused input device */ 59 - if (dev->maxapplication == 1) 60 - return 0; 61 - 62 - ret = hid_hw_start(dev, HID_CONNECT_DEFAULT); 63 - if (ret) { 64 - hid_err(dev, "hw start failed\n"); 65 - return ret; 66 - } 67 - 68 - return 0; 69 - } 70 47 static const struct hid_device_id redragon_devices[] = { 71 48 {HID_USB_DEVICE(USB_VENDOR_ID_JESS, USB_DEVICE_ID_REDRAGON_ASURA)}, 72 49 {} ··· 54 77 static struct hid_driver redragon_driver = { 55 78 .name = "redragon", 56 79 .id_table = redragon_devices, 57 - .report_fixup = redragon_report_fixup, 58 - .probe = redragon_probe 80 + .report_fixup = redragon_report_fixup 59 81 }; 60 82 61 83 module_hid_driver(redragon_driver);