Commit 0c97171a authored by Vojtech Pavlik's avatar Vojtech Pavlik

input: Fix HID LED mapping. LEDs were ignored because the usage

       value contains the page code in high 16 bits.
Signed-off-by: default avatarVojtech Pavlik <vojtech@suse.cz>
parent 6522a6d0
......@@ -86,12 +86,12 @@ static const struct hid_usage_entry hid_usage_table[] = {
{0, 0x92, "D-PadRight"},
{0, 0x93, "D-PadLeft"},
{ 7, 0, "Keyboard" },
{ 8, 0, "LED" },
{0, 0x01, "NumLock"},
{0, 0x02, "CapsLock"},
{0, 0x03, "ScrollLock"},
{0, 0x04, "Compose"},
{0, 0x05, "Kana"},
{ 8, 0, "LED" },
{ 9, 0, "Button" },
{ 10, 0, "Ordinal" },
{ 12, 0, "Consumer" },
......
......@@ -185,9 +185,9 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
break;
case HID_UP_LED:
if (usage->hid - 1 >= LED_MAX)
if (((usage->hid - 1) & 0xffff) >= LED_MAX)
goto ignore;
map_led(usage->hid - 1);
map_led((usage->hid - 1) & 0xffff);
break;
case HID_UP_DIGITIZER:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment