linux-yocto/drivers/input
Dmitry Torokhov 071b24b54d Input: fix regression when re-registering input handlers
Commit d469647baf ("Input: simplify event handling logic") introduced
code that would set handler->events() method to either
input_handler_events_filter() or input_handler_events_default() or
input_handler_events_null(), depending on the kind of input handler
(a filter or a regular one) we are dealing with. Unfortunately this
breaks cases when we try to re-register the same filter (as is the case
with sysrq handler): after initial registration the handler will have 2
event handling methods defined, and will run afoul of the check in
input_handler_check_methods():

	input: input_handler_check_methods: only one event processing method can be defined (sysrq)
	sysrq: Failed to register input handler, error -22

Fix this by adding handle_events() method to input_handle structure and
setting it up when registering a new input handle according to event
handling methods defined in associated input_handler structure, thus
avoiding modifying the input_handler structure.

Reported-by: "Ned T. Crigler" <crigler@gmail.com>
Reported-by: Christian Heusel <christian@heusel.eu>
Tested-by: "Ned T. Crigler" <crigler@gmail.com>
Tested-by: Peter Seiderer <ps.report@gmx.net>
Fixes: d469647baf ("Input: simplify event handling logic")
Link: https://lore.kernel.org/r/Zx2iQp6csn42PJA7@xavtug
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-11-02 22:28:58 -07:00
..
gameport Driver core changes for 6.11-rc1 2024-07-25 10:42:22 -07:00
joystick Input: xpad - add support for MSI Claw A1M 2024-10-18 14:34:57 -07:00
keyboard Input: adp5588-keys - do not try to disable interrupt 0 2024-10-25 15:52:45 -07:00
misc Input: ims-pcu - fix calling interruptible mutex 2024-09-10 16:13:44 -07:00
mouse Revert "Input: Add driver for PixArt PS/2 touchpad" 2024-10-01 03:54:05 -07:00
rmi4 Merge branch 'ib/6.11-rc6-matrix-keypad-spitz' into next 2024-09-05 21:49:07 -07:00
serio Merge branch 'next' into for-linus 2024-09-20 01:24:24 -07:00
tablet Input: tablet - use sizeof(*pointer) instead of sizeof(type) 2024-06-02 21:32:03 -07:00
tests Input updates for v6.11-rc0 2024-07-19 16:51:39 -07:00
touchscreen Input: edt-ft5x06 - fix regmap leak when probe fails 2024-10-24 18:38:07 -07:00
apm-power.c
evbug.c
evdev.c Input: evdev - limit amount of data for writes 2024-08-23 23:51:14 -07:00
ff-core.c Input: ff-core - prefer struct_size over open coded arithmetic 2024-04-30 14:04:31 -07:00
ff-memless.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
input-compat.c
input-compat.h
input-core-private.h Input: deactivate MT slots when inhibiting or suspending devices 2022-07-20 11:35:13 -07:00
input-leds.c Input: leds - change config symbol dependency for audio mute trigger 2024-03-03 14:46:06 -08:00
input-mt.c Input: MT - limit max slots 2024-07-29 10:44:48 -07:00
input-poller.c
input-poller.h
input.c Input: fix regression when re-registering input handlers 2024-11-02 22:28:58 -07:00
joydev.c Input: joydev - fix comment typo 2022-09-25 00:57:25 -07:00
Kconfig Input: tests - modular KUnit tests should not depend on KUNIT=y 2023-05-02 10:39:00 -07:00
Makefile Input: Add KUnit tests for some of the input core helper functions 2023-04-01 22:47:04 -07:00
matrix-keymap.c Input: matrix-keymap - switch to using __free() cleanup facility 2024-08-29 10:59:30 -07:00
mousedev.c
sparse-keymap.c
touchscreen.c Input: touchscreen - avoid bitwise vs logical OR warning 2021-10-15 22:22:54 -07:00
vivaldi-fmap.c Input: add missing MODULE_DESCRIPTION() macros 2024-06-09 14:38:48 -07:00