History

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.

Dmitry Torokhov committed 1 year ago

Commit 84060ea1 parent a8353b61 file · +6 −2Browse files

Showing the changes to drivers (1 of 1 file). Show all

Unified · Split

drivers/input/evdev.c+6−2
@@ -1408,8 +1408,12 @@ static void evdev_disconnect(struct input_handle *handle) · 1407 unmodified lines
14081408 }
14091409
14101410 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 */
14131417 };
14141418
14151419 MODULE_DEVICE_TABLE(input, evdev_ids);