aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/hid.h
diff options
context:
space:
mode:
authorBenjamin Tissoires <benjamin.tissoires@gmail.com>2012-11-14 10:59:16 -0500
committerJiri Kosina <jkosina@suse.cz>2012-11-15 04:08:14 -0500
commitf262d1fa2c651a5e2f92b6aee8779597631cd5d4 (patch)
treecdb954e3eae7d1aeb462617742ed13217354828f /include/linux/hid.h
parent774638386826621c984ab6994439f474709cac5e (diff)
HID: add usage_index in struct hid_usage.
Currently, there is no way to know the index of the current field in the .input_mapping and .event callbacks when this field is inside an array of HID fields. This patch adds this index to the struct hid_usage so that this information is available to input_mapping and event callbacks. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com> Acked-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'include/linux/hid.h')
-rw-r--r--include/linux/hid.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/hid.h b/include/linux/hid.h
index 4161bf2c0b5b..d2c42dd222c1 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -342,6 +342,7 @@ struct hid_collection {
342struct hid_usage { 342struct hid_usage {
343 unsigned hid; /* hid usage code */ 343 unsigned hid; /* hid usage code */
344 unsigned collection_index; /* index into collection array */ 344 unsigned collection_index; /* index into collection array */
345 unsigned usage_index; /* index into usage array */
345 /* hidinput data */ 346 /* hidinput data */
346 __u16 code; /* input driver code */ 347 __u16 code; /* input driver code */
347 __u8 type; /* input driver type */ 348 __u8 type; /* input driver type */