Module Name: src
Committed By: jakllsch
Date: Sat Jan 2 20:49:39 UTC 2016
Modified Files:
src/sys/dev/usb: hid.c
Log Message:
Do what libusbhid() does for Usage value of non-Variable Main items,
instead of something marked XXX that actually causes problems for hid_locate().
To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/dev/usb/hid.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/usb/hid.c
diff -u src/sys/dev/usb/hid.c:1.37 src/sys/dev/usb/hid.c:1.38
--- src/sys/dev/usb/hid.c:1.37 Sat Jan 2 20:45:07 2016
+++ src/sys/dev/usb/hid.c Sat Jan 2 20:49:39 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: hid.c,v 1.37 2016/01/02 20:45:07 jakllsch Exp $ */
+/* $NetBSD: hid.c,v 1.38 2016/01/02 20:49:39 jakllsch Exp $ */
/* $FreeBSD: src/sys/dev/usb/hid.c,v 1.11 1999/11/17 22:33:39 n_hibma Exp $ */
/*
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hid.c,v 1.37 2016/01/02 20:45:07 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hid.c,v 1.38 2016/01/02 20:49:39 jakllsch Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -220,7 +220,8 @@ hid_get_item(struct hid_data *s, struct
}
goto top;
} else {
- c->usage = c->_usage_page; /* XXX */
+ if (s->minset)
+ c->usage = c->usage_minimum;
*h = *c;
h->next = NULL;
c->loc.pos +=