Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 343077
b: refs/heads/master
c: f262d1f
h: refs/heads/master
i:
  343075: 414c058
v: v3
  • Loading branch information
Benjamin Tissoires authored and Jiri Kosina committed Nov 15, 2012
1 parent a7b75ff commit ee1af8e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 774638386826621c984ab6994439f474709cac5e
refs/heads/master: f262d1fa2c651a5e2f92b6aee8779597631cd5d4
4 changes: 4 additions & 0 deletions trunk/drivers/hid/hid-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ EXPORT_SYMBOL_GPL(hid_register_report);
static struct hid_field *hid_register_field(struct hid_report *report, unsigned usages, unsigned values)
{
struct hid_field *field;
int i;

if (report->maxfield == HID_MAX_FIELDS) {
hid_err(report->device, "too many fields in report\n");
Expand All @@ -110,6 +111,9 @@ static struct hid_field *hid_register_field(struct hid_report *report, unsigned
field->value = (s32 *)(field->usage + usages);
field->report = report;

for (i = 0; i < usages; i++)
field->usage[i].usage_index = i;

return field;
}

Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/hid.h
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ struct hid_collection {
struct hid_usage {
unsigned hid; /* hid usage code */
unsigned collection_index; /* index into collection array */
unsigned usage_index; /* index into usage array */
/* hidinput data */
__u16 code; /* input driver code */
__u8 type; /* input driver type */
Expand Down

0 comments on commit ee1af8e

Please sign in to comment.