summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authoraugustss <augustss@NetBSD.org>2001-12-29 17:48:29 +0000
committeraugustss <augustss@NetBSD.org>2001-12-29 17:48:29 +0000
commit198e193c28fb132ac906730f0eb777d82cf9bebe (patch)
treefcd3d819e93c5070a64ce7017ef20b6a5781da61 /sys/dev
parent0d2905f4fcb37938f6fe43c6c818751d78ed14af (diff)
Don't clear global report values when reporting an item.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/usb/hid.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/dev/usb/hid.c b/sys/dev/usb/hid.c
index e52d6d88df0..7748385cb12 100644
--- a/sys/dev/usb/hid.c
+++ b/sys/dev/usb/hid.c
@@ -1,4 +1,4 @@
-/* $NetBSD: hid.c,v 1.18 2001/12/28 17:32:36 augustss Exp $ */
+/* $NetBSD: hid.c,v 1.19 2001/12/29 17:48:29 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/hid.c,v 1.11 1999/11/17 22:33:39 n_hibma Exp $ */
/*
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hid.c,v 1.18 2001/12/28 17:32:36 augustss Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hid.c,v 1.19 2001/12/29 17:48:29 augustss Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -145,8 +145,6 @@ hid_get_item(struct hid_data *s, struct hid_item *h)
DPRINTFN(5,("return multi\n"));
return (1);
} else {
- c->loc.count = 0;
- c->loc.size = 0;
s->multimax = 0;
s->nu = 0;
hid_clear_local(c);
@@ -246,7 +244,6 @@ hid_get_item(struct hid_data *s, struct hid_item *h)
c->collevel++;
*h = *c;
hid_clear_local(c);
- /*c->report_ID = 0;*/
s->nu = 0;
return (1);
case 11: /* Feature */
@@ -258,7 +255,6 @@ hid_get_item(struct hid_data *s, struct hid_item *h)
c->kind = hid_endcollection;
c->collevel--;
*h = *c;
- /*hid_clear_local(c);*/
s->nu = 0;
return (1);
default:
@@ -388,7 +384,7 @@ hid_report_size(void *buf, int len, enum hid_kind k, u_int8_t id)
DPRINTFN(2,("hid_report_size: kind=%d id=%d\n", k, id));
for (d = hid_start_parse(buf, len, k); hid_get_item(d, &h); ) {
DPRINTFN(2,("hid_report_size: item kind=%d id=%d pos=%d "
- "size=%d cpunt=%d\n",
+ "size=%d count=%d\n",
h.kind, h.report_ID, h.loc.pos, h.loc.size,
h.loc.count));
if (h.report_ID == id && h.kind == k) {
@@ -399,6 +395,10 @@ hid_report_size(void *buf, int len, enum hid_kind k, u_int8_t id)
}
}
hid_end_parse(d);
+#ifdef DIAGNOSTIC
+ if (lo != 0)
+ printf("hid_report_size: lo != 0\n");
+#endif
return ((hi - lo + 7) / 8);
}