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.
Showing the changes to drivers (1 of 1 file). Show all
Unified · Split
| @@ -1408,8 +1408,12 @@ static void evdev_disconnect(struct input_handle *handle) · 1407 unmodified lines | |||
| 1408 | } | 1408 | } |
| 1409 | 1409 | ||
| 1410 | static const struct input_device_id evdev_ids[] = { | 1410 | static const struct input_device_id evdev_ids[] = { |
| 1411 | { .driver_info = 1 }, /* Matches all devices */ | 1411 | { |
| 1412 | { }, /* Terminating zero entry */ | 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 | MODULE_DEVICE_TABLE(input, evdev_ids); | 1419 | MODULE_DEVICE_TABLE(input, evdev_ids); |