Commit 84060ea3 authored by Dmitry Torokhov's avatar Dmitry Torokhov
Browse files

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: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent a8353b63
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -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);