summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2009-07-24 08:37:48 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2009-07-24 08:37:48 +0000
commit52aec2a9c1e7fc0f588c626b209af3a3221f56f5 (patch)
tree147745b3e29e2b963acdc175534b9cafd8fc3737
parenta64856e75523a9fc0aabf80adb847e417d1d1ad2 (diff)
Global Item #3 should be Physical Minimum not Maximum according
to the HID spec. From FreeBSD hid.c rev 1.31
-rw-r--r--lib/libusbhid/parse.c4
-rw-r--r--sys/dev/usb/hid.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/libusbhid/parse.c b/lib/libusbhid/parse.c
index 015a092bddc..53b59af3bb5 100644
--- a/lib/libusbhid/parse.c
+++ b/lib/libusbhid/parse.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.c,v 1.3 2004/06/04 00:47:32 deraadt Exp $ */
+/* $OpenBSD: parse.c,v 1.4 2009/07/24 08:37:47 jsg Exp $ */
/* $NetBSD: parse.c,v 1.2 2001/12/29 20:44:22 augustss Exp $ */
/*
@@ -318,7 +318,7 @@ hid_get_item_raw(hid_data_t s, hid_item_t *h)
c->logical_maximum = dval;
break;
case 3:
- c->physical_maximum = dval;
+ c->physical_minimum = dval;
break;
case 4:
c->physical_maximum = dval;
diff --git a/sys/dev/usb/hid.c b/sys/dev/usb/hid.c
index 99c816dbb8a..db46c714544 100644
--- a/sys/dev/usb/hid.c
+++ b/sys/dev/usb/hid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hid.c,v 1.21 2008/06/26 05:42:18 ray Exp $ */
+/* $OpenBSD: hid.c,v 1.22 2009/07/24 08:37:47 jsg Exp $ */
/* $NetBSD: hid.c,v 1.23 2002/07/11 21:14:25 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/hid.c,v 1.11 1999/11/17 22:33:39 n_hibma Exp $ */
@@ -268,7 +268,7 @@ hid_get_item(struct hid_data *s, struct hid_item *h)
c->logical_maximum = dval;
break;
case 3:
- c->physical_maximum = dval;
+ c->physical_minimum = dval;
break;
case 4:
c->physical_maximum = dval;