Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 227609
b: refs/heads/master
c: 504499f
h: refs/heads/master
i:
  227607: 3dd7f2b
v: v3
  • Loading branch information
Joe Perches authored and Jiri Kosina committed Dec 10, 2010
1 parent dc2e705 commit 4105121
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a3789a1783d37f2772ba5046b26416c98dfe1bfa
refs/heads/master: 504499f22c08a03e2e19dc88d31aa0ecd2ac815e
10 changes: 7 additions & 3 deletions trunk/drivers/hid/hid-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,14 @@ static int close_collection(struct hid_parser *parser)

static unsigned hid_lookup_collection(struct hid_parser *parser, unsigned type)
{
struct hid_collection *collection = parser->device->collection;
int n;
for (n = parser->collection_stack_ptr - 1; n >= 0; n--)
if (parser->device->collection[parser->collection_stack[n]].type == type)
return parser->device->collection[parser->collection_stack[n]].usage;

for (n = parser->collection_stack_ptr - 1; n >= 0; n--) {
unsigned index = parser->collection_stack[n];
if (collection[index].type == type)
return collection[index].usage;
}
return 0; /* we know nothing about this usage type */
}

Expand Down

0 comments on commit 4105121

Please sign in to comment.