]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
Input: evdev - switch matching to EV_SYN
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 18 Feb 2025 23:09:21 +0000 (15:09 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 2 Jul 2025 04:02:57 +0000 (21:02 -0700)
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>
drivers/input/evdev.c

index b5cbb57ee5f60073a41d16da23a8d3fa6c09f04a..90ff6be85cf466bb519adf5df2b0d23b7544c563 100644 (file)
@@ -1408,8 +1408,12 @@ static void evdev_disconnect(struct input_handle *handle)
 }
 
 static const struct input_device_id evdev_ids[] = {
-       { .driver_info = 1 },   /* Matches all devices */
-       { },                    /* Terminating zero entry */
+       {
+               /* Matches all devices */
+               .flags = INPUT_DEVICE_ID_MATCH_EVBIT,
+               .evbit = { BIT_MASK(EV_SYN) },
+       },
+       { }     /* Terminating zero entry */
 };
 
 MODULE_DEVICE_TABLE(input, evdev_ids);