[systemd-devel] [PATCH] udev: input_id: tag accelerometers as ID_INPUT_ACCELEROMETER
Hans de Goede
hdegoede at redhat.com
Fri Apr 3 06:42:58 PDT 2015
Hi,
On 03-04-15 13:13, Lennart Poettering wrote:
> On Fri, 03.04.15 12:07, Hans de Goede (hdegoede at redhat.com) wrote:
>
>> input_id already (tries to) tag accelerometers as such, but this only works
>> for absolute accelerometers. Recent kernels mark accelerometers through an
>> input prop. Trust that prop and always tag devices with it with
>> ID_INPUT_ACCELEROMETER.
>>
>> Note that detection by the prop bit works the same as the existing detection
>> and will ensure that no other tags get set on the device.
>>
>> Signed-off-by: Hans de Goede <hdegoede at redhat.com>
>
> We don't use S-o-b on systemd.
Ok.
>> index d4c38ca..ecfc447 100644
>> --- a/src/udev/udev-builtin-input_id.c
>> +++ b/src/udev/udev-builtin-input_id.c
>> @@ -136,6 +136,11 @@ static void test_pointers (struct udev_device *dev,
>> int is_mouse = 0;
>> int is_touchpad = 0;
>>
>> + if (test_bit (INPUT_PROP_ACCELEROMETER, bitmask_props)) {
>
> No space between the function name and the opening (), please, this is
> not GNU coding style...
I know, but all the test_bit calls in that function do this, so I was
trying to be consistent with the existing code in the function.
I'm fine with doing this either way.
Regards,
Hans
More information about the systemd-devel
mailing list