Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Input: evdev - switch matching to EV_SYN

Each input device has EV_SYN capability. This is enforced by the input
core which sets this capability bit unconditionally in
input_register_device().

Switch evdev matching from declaring non-zero id->driver_info to match
on EV_SYN so that special handling can be removed from
input_match_device() and "driver_info" field can be removed from
input_device_id structure.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

+6 -2
+6 -2
drivers/input/evdev.c
··· 1408 1408 } 1409 1409 1410 1410 static const struct input_device_id evdev_ids[] = { 1411 - { .driver_info = 1 }, /* Matches all devices */ 1412 - { }, /* Terminating zero entry */ 1411 + { 1412 + /* Matches all devices */ 1413 + .flags = INPUT_DEVICE_ID_MATCH_EVBIT, 1414 + .evbit = { BIT_MASK(EV_SYN) }, 1415 + }, 1416 + { } /* Terminating zero entry */ 1413 1417 }; 1414 1418 1415 1419 MODULE_DEVICE_TABLE(input, evdev_ids);