Skip to content

Commit

Permalink
HID: redragon: fix num lock and caps lock LEDs
Browse files Browse the repository at this point in the history
commit dc9b8e8 upstream.

The redragon asura keyboard registers two input devices. The initial commit
85455dd ("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: 85455dd ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Robert Munteanu authored and Greg Kroah-Hartman committed Sep 15, 2018
1 parent 838ddbf commit e496c9a
Showing 1 changed file with 1 addition and 25 deletions.
26 changes: 1 addition & 25 deletions drivers/hid/hid-redragon.c
Original file line number Diff line number Diff line change
@@ -44,29 +44,6 @@ static __u8 *redragon_report_fixup(struct hid_device *hdev, __u8 *rdesc,
return rdesc;
}

static int redragon_probe(struct hid_device *dev,
const struct hid_device_id *id)
{
int ret;

ret = hid_parse(dev);
if (ret) {
hid_err(dev, "parse failed\n");
return ret;
}

/* do not register unused input device */
if (dev->maxapplication == 1)
return 0;

ret = hid_hw_start(dev, HID_CONNECT_DEFAULT);
if (ret) {
hid_err(dev, "hw start failed\n");
return ret;
}

return 0;
}
static const struct hid_device_id redragon_devices[] = {
{HID_USB_DEVICE(USB_VENDOR_ID_JESS, USB_DEVICE_ID_REDRAGON_ASURA)},
{}
@@ -77,8 +54,7 @@ MODULE_DEVICE_TABLE(hid, redragon_devices);
static struct hid_driver redragon_driver = {
.name = "redragon",
.id_table = redragon_devices,
.report_fixup = redragon_report_fixup,
.probe = redragon_probe
.report_fixup = redragon_report_fixup
};

module_hid_driver(redragon_driver);

0 comments on commit e496c9a

Please sign in to comment.