HID: input: Fix parsing of HID_CP_CONSUMER_CONTROL fields
PATCH 1/1 HID: input: Fix parsing of HID_CP_CONSUMER_CONTROL fields
Fix parsing of HID_CP_CONSUMER_CONTROL fields which are not in the HID_CP_PROGRAMMABLEBUTTONS collection.
Fixes bcfa8d14570d ("HID: input: Add support for Programmable Buttons")
Cc Thomas Weißschuh <[email protected]>
Suggested-by Benjamin Tissoires <[email protected]>
Signed-off-by Hans de Goede <[email protected]>
--- drivers/hid/hid-input.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/hid/hid-input.c +2 -3
@@ -650,10 +650,9 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel code +=KEY_MACRO1 ; else code += BTN_TRIGGER_HAPPY - 0x1e; - }else { - goto ignore; +break ; } -break ; + fallthrough;default :switch (field->physical) {case HID_GD_MOUSE :
Signature · 1 line
2.31.1
Quoted 31 lines · Hans de Goede
Fix parsing of
HID_CP_CONSUMER_CONTROLfields which are not in theHID_CP_PROGRAMMABLEBUTTONScollection.Fixes bcfa8d14570d ("HID: input: Add support for Programmable Buttons")Cc Thomas Weißschuh <[email protected]>Suggested-by Benjamin Tissoires <[email protected]>Signed-off-by Hans de Goede <[email protected]>--- drivers/hid/hid-input.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)drivers/hid/hid-input.c +2
-3@@ -650,10 +650,9 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel code +=KEY_MACRO1 ; else code += BTN_TRIGGER_HAPPY - 0x1e; - }else { - goto ignore; +break ; } -break ; + fallthrough;default :switch (field->physical) {case HID_GD_MOUSE :Signature · 1 line
2.31.1
Reviewed-by Thomas Weißschuh <[email protected]>
Although looking at the descriptor I'm not sure that what it does is correct.
FYI I have another patch in the pipeline that fixes broken keymap remapping for ignored keys.
Such a remapping via the hwdb would have been another, maybe more correct, way to fix this issue.
Quoted 8 lines · Hans de Goede
Fix parsing of
HID_CP_CONSUMER_CONTROLfields which are not in theHID_CP_PROGRAMMABLEBUTTONScollection.Fixes bcfa8d14570d ("HID: input: Add support for Programmable Buttons")Cc Thomas Weißschuh <[email protected]>Suggested-by Benjamin Tissoires <[email protected]>Signed-off-by Hans de Goede <[email protected]>
Applied, thanks Hans.
Signature · 2 lines
Jiri Kosina SUSE Labs