[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4CFFEC71.8060103@euromail.se>
Date: Wed, 08 Dec 2010 21:37:05 +0100
From: Henrik Rydberg <rydberg@...omail.se>
To: Valdis.Kletnieks@...edu
CC: Dmitry Torokhov <dmitry.torokhov@...il.com>,
Jiri Kosina <jkosina@...e.cz>, linux-input@...r.kernel.org,
linux-kernel@...r.kernel.org, Ping Cheng <pingc@...om.com>,
Chris Bagwell <chris@...bagwell.com>
Subject: Re: [RFC][PATCH] input: Introduce device information ioctl
>
>> /*
>> + * 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-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists