diff options
author | mav <mav@FreeBSD.org> | 2012-09-20 18:56:27 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2012-09-20 18:56:27 +0000 |
commit | 3a2b0e2811fa295dd198978ef2dcb53b37c2570d (patch) | |
tree | c4bb13c59030ccd9fce54c69846a554e23212d84 /lib/libusbhid/descr.c | |
parent | 4e994ee0cd8c584f856f8ce211add093547f82b3 (diff) | |
download | FreeBSD-src-3a2b0e2811fa295dd198978ef2dcb53b37c2570d.zip FreeBSD-src-3a2b0e2811fa295dd198978ef2dcb53b37c2570d.tar.gz |
Restore handling of the third argument (id) of hid_start_parse(), same as
it is done in NetBSD/OpenBSD, and as it was here before r205728.
I personally think this API or its implementation is incorrect, as it is not
correct to filter collections based on report ID, as they are orthogonal
in general case, but I see no harm from supporting this feature.
PR: usb/171810
Submitted by: Vitaly Magerya <vmagerya@gmail.com>
MFC after: 1 month
Diffstat (limited to 'lib/libusbhid/descr.c')
-rw-r--r-- | lib/libusbhid/descr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libusbhid/descr.c b/lib/libusbhid/descr.c index def90da..0c66342 100644 --- a/lib/libusbhid/descr.c +++ b/lib/libusbhid/descr.c @@ -68,7 +68,7 @@ hid_get_report_id(int fd) if ((rep = hid_get_report_desc(fd)) == NULL) goto use_ioctl; kindset = 1 << hid_input | 1 << hid_output | 1 << hid_feature; - for (d = hid_start_parse(rep, kindset, 0); hid_get_item(d, &h); ) { + for (d = hid_start_parse(rep, kindset, -1); hid_get_item(d, &h); ) { /* Return the first report ID we met. */ if (h.report_ID != 0) { temp = h.report_ID; |