Skip to content

Commit 84060ea

Browse files
committed
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 <[email protected]>
1 parent a8353b6 commit 84060ea

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

drivers/input/evdev.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1408,8 +1408,12 @@ static void evdev_disconnect(struct input_handle *handle)
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);

0 commit comments

Comments
 (0)