* [PATCH] HID: input: Fix parsing of HID_CP_CONSUMER_CONTROL fields
@ 2021-10-28 16:33 Hans de Goede
2021-10-28 17:15 ` Thomas Weißschuh
2021-11-19 14:47 ` Jiri Kosina
0 siblings, 2 replies; 3+ messages in thread
From: Hans de Goede @ 2021-10-28 16:33 UTC (permalink / raw)
To: Jiri Kosina, Benjamin Tissoires
Cc: Hans de Goede, linux-input, Thomas Weißschuh, Benjamin Tissoires
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")
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=2018096
Cc: Thomas Weißschuh <linux@weissschuh.net>
Suggested-by: Benjamin Tissoires <btissoir@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
drivers/hid/hid-input.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index 4b5ebeacd283..4b3f4a5e2305 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -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:
--
2.31.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] HID: input: Fix parsing of HID_CP_CONSUMER_CONTROL fields
2021-10-28 16:33 [PATCH] HID: input: Fix parsing of HID_CP_CONSUMER_CONTROL fields Hans de Goede
@ 2021-10-28 17:15 ` Thomas Weißschuh
2021-11-19 14:47 ` Jiri Kosina
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Weißschuh @ 2021-10-28 17:15 UTC (permalink / raw)
To: Hans de Goede
Cc: Jiri Kosina, Benjamin Tissoires, linux-input, Benjamin Tissoires
On 2021-10-28 18:33+0200, Hans de Goede wrote:
> 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")
> BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=2018096
> Cc: Thomas Weißschuh <linux@weissschuh.net>
> Suggested-by: Benjamin Tissoires <btissoir@redhat.com>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
> drivers/hid/hid-input.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
> index 4b5ebeacd283..4b3f4a5e2305 100644
> --- a/drivers/hid/hid-input.c
> +++ b/drivers/hid/hid-input.c
> @@ -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:
> --
> 2.31.1
Reviewed-By: Thomas Weißschuh <linux@weissschuh.net>
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] HID: input: Fix parsing of HID_CP_CONSUMER_CONTROL fields
2021-10-28 16:33 [PATCH] HID: input: Fix parsing of HID_CP_CONSUMER_CONTROL fields Hans de Goede
2021-10-28 17:15 ` Thomas Weißschuh
@ 2021-11-19 14:47 ` Jiri Kosina
1 sibling, 0 replies; 3+ messages in thread
From: Jiri Kosina @ 2021-11-19 14:47 UTC (permalink / raw)
To: Hans de Goede
Cc: Benjamin Tissoires, linux-input, Thomas Weißschuh,
Benjamin Tissoires
On Thu, 28 Oct 2021, Hans de Goede wrote:
> 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")
> BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=2018096
> Cc: Thomas Weißschuh <linux@weissschuh.net>
> Suggested-by: Benjamin Tissoires <btissoir@redhat.com>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Applied, thanks Hans.
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-11-19 14:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-28 16:33 [PATCH] HID: input: Fix parsing of HID_CP_CONSUMER_CONTROL fields Hans de Goede
2021-10-28 17:15 ` Thomas Weißschuh
2021-11-19 14:47 ` Jiri Kosina
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).