Make sure to only pickup hid_input items when parsing input reports.

As it turns out, libusbhid(3) also picks up hic_collection items even
though we explicitly requested hid_input items only.

Tested by:	Buganini < buganini at gmail dot com >
MFC after:	1 week
This commit is contained in:
Maksim Yevmenkin 2010-09-08 20:00:27 +00:00
parent 87ff4bceb6
commit fc780ca17e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=212335

View File

@ -160,7 +160,8 @@ hid_interrupt(bthid_session_p s, uint8_t *data, int32_t len)
for (d = hid_start_parse(hid_device->desc, 1 << hid_input, -1);
hid_get_item(d, &h) > 0; ) {
if ((h.flags & HIO_CONST) || (h.report_ID != report_id))
if ((h.flags & HIO_CONST) || (h.report_ID != report_id) ||
(h.kind != hid_input))
continue;
page = HID_PAGE(h.usage);