Re: [RFC][PATCH] input: Introduce device information ioctl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>

>>  /*
>> + * Device types
>> + */
>> +
>> +#define DEVTYPE_KEYBOARD	0
>> +#define DEVTYPE_MOUSE		1
>> +#define DEVTYPE_JOYSTICK	2
>> +#define DEVTYPE_TOUCHPAD	3
>> +#define DEVTYPE_TABLET		4
>> +#define DEVTYPE_TOUCHSCREEN	5
> 
> Add a #define DEVTYPE_UNKNOWN 0 and push everybody else down one. That way,
> an uninitialized 'struct input_devinfo' won't claim to be a keyboard.


Since types is a bitmask, the initial value will actually be unclaimed already.
To be explicit, for a keyboard, types = 1 << 0 = 1.

Thanks,
Henrik
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux