]> git.baikalelectronics.ru Git - kernel.git/commit
HID: core: de-duplicate some code in hid_input_field()
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>
Thu, 3 Feb 2022 14:32:16 +0000 (15:32 +0100)
committerJiri Kosina <jkosina@suse.cz>
Tue, 1 Mar 2022 14:46:02 +0000 (15:46 +0100)
commitabcea7512188ac12c2f9a0f98d59cd716e937e2f
tree121092be9ddd649c3942c2873bbb9ffd45672ef1
parent80801aca2c5e93e18e70abda2da4a45a1f6ff33c
HID: core: de-duplicate some code in hid_input_field()

I had to go twice through the history to get a grasp at this code.
De-duplicate the various tests in one common helper to make it
more explicit.

Note that the `HID_UP_KEYBOARD + 1` condition is tested through
https://gitlab.freedesktop.org/libevdev/hid-tools/-/merge_requests/121

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Reviewed-by: Ping Cheng <ping.cheng@wacom.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-core.c