udev: add ID_INPUT_SWITCH for devices with switch capability (#5057)

This commit is contained in:
Peter Hutterer 2017-01-10 17:36:46 +10:00 committed by Martin Pitt
parent 6534c8d35f
commit 64083a6078

View file

@ -323,6 +323,9 @@ static int builtin_input_id(struct udev_device *dev, int argc, char *argv[], boo
if (!is_pointer && !is_key && test_bit(EV_REL, bitmask_ev) &&
(test_bit(REL_WHEEL, bitmask_rel) || test_bit(REL_HWHEEL, bitmask_rel)))
udev_builtin_add_property(dev, test, "ID_INPUT_KEY", "1");
if (test_bit(EV_SW, bitmask_ev))
udev_builtin_add_property(dev, test, "ID_INPUT_SWITCH", "1");
}
devnode = udev_device_get_devnode(dev);