HID: add usage_index in struct hid_usage.
authorBenjamin Tissoires <benjamin.tissoires@gmail.com>
Wed, 14 Nov 2012 15:59:16 +0000 (16:59 +0100)
committerJiri Kosina <jkosina@suse.cz>
Thu, 15 Nov 2012 09:08:14 +0000 (10:08 +0100)
commitf262d1fa2c651a5e2f92b6aee8779597631cd5d4
treecdb954e3eae7d1aeb462617742ed13217354828f
parent774638386826621c984ab6994439f474709cac5e
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>
drivers/hid/hid-core.c
include/linux/hid.h