Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb Do what libusbhid() does for Usage value of non-...



details:   https://anonhg.NetBSD.org/src/rev/52795161fa38
branches:  trunk
changeset: 342640:52795161fa38
user:      jakllsch <jakllsch%NetBSD.org@localhost>
date:      Sat Jan 02 20:49:39 2016 +0000

description:
Do what libusbhid() does for Usage value of non-Variable Main items,
instead of something marked XXX that actually causes problems for hid_locate().

diffstat:

 sys/dev/usb/hid.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r c8462416e1ab -r 52795161fa38 sys/dev/usb/hid.c
--- a/sys/dev/usb/hid.c Sat Jan 02 20:45:07 2016 +0000
+++ b/sys/dev/usb/hid.c Sat Jan 02 20:49:39 2016 +0000
@@ -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 @@
                                        }
                                        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 +=



Home | Main Index | Thread Index | Old Index