From fdc486ed70087ec4eda9612dd9e541308d450e48 Mon Sep 17 00:00:00 2001 From: anton Date: Fri, 20 May 2022 05:03:45 +0000 Subject: [PATCH] Rename hid_none to hid_all as it represents all possible hid kinds by now. --- sys/dev/hid/hid.c | 6 +++--- sys/dev/hid/hid.h | 4 ++-- sys/dev/i2c/ihidev.c | 4 ++-- sys/dev/usb/uhidev.c | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/dev/hid/hid.c b/sys/dev/hid/hid.c index 8611d9219a0..c758764f17a 100644 --- a/sys/dev/hid/hid.c +++ b/sys/dev/hid/hid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hid.c,v 1.4 2022/05/20 05:02:47 anton Exp $ */ +/* $OpenBSD: hid.c,v 1.5 2022/05/20 05:03:45 anton 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 $ */ @@ -229,7 +229,7 @@ hid_get_item(struct hid_data *s, struct hid_item *h) * Only copy HID item, increment position and return * if correct kind! */ - if (s->kind == hid_none || s->kind == c->kind) { + if (s->kind == hid_all || s->kind == c->kind) { *h = *c; DPRINTF("%u,%u,%u\n", h->loc.pos, h->loc.size, h->loc.count); @@ -637,7 +637,7 @@ hid_is_collection(const void *desc, int size, uint8_t id, int32_t usage) struct hid_item hi; uint32_t coll_usage = ~0; - hd = hid_start_parse(desc, size, hid_none); + hd = hid_start_parse(desc, size, hid_all); DPRINTF("%s: id=%d usage=0x%x\n", __func__, id, usage); while (hid_get_item(hd, &hi)) { diff --git a/sys/dev/hid/hid.h b/sys/dev/hid/hid.h index 28de534124e..7400e920bc2 100644 --- a/sys/dev/hid/hid.h +++ b/sys/dev/hid/hid.h @@ -1,4 +1,4 @@ -/* $OpenBSD: hid.h,v 1.9 2021/09/01 10:41:39 anton Exp $ */ +/* $OpenBSD: hid.h,v 1.10 2022/05/20 05:03:45 anton Exp $ */ /* $NetBSD: hid.h,v 1.8 2002/07/11 21:14:25 augustss Exp $ */ /* $FreeBSD: src/sys/dev/usb/hid.h,v 1.7 1999/11/17 22:33:40 n_hibma Exp $ */ @@ -43,7 +43,7 @@ enum hid_kind { hid_feature, hid_collection, hid_endcollection, - hid_none + hid_all }; struct hid_location { diff --git a/sys/dev/i2c/ihidev.c b/sys/dev/i2c/ihidev.c index f6d95265790..2d1d7e48913 100644 --- a/sys/dev/i2c/ihidev.c +++ b/sys/dev/i2c/ihidev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ihidev.c,v 1.26 2022/04/06 18:59:28 naddy Exp $ */ +/* $OpenBSD: ihidev.c,v 1.27 2022/05/20 05:03:45 anton Exp $ */ /* * HID-over-i2c driver * @@ -732,7 +732,7 @@ ihidev_maxrepid(void *buf, int len) maxid = -1; h.report_ID = 0; - for (d = hid_start_parse(buf, len, hid_none); hid_get_item(d, &h); ) + for (d = hid_start_parse(buf, len, hid_all); hid_get_item(d, &h);) if (h.report_ID > maxid) maxid = h.report_ID; hid_end_parse(d); diff --git a/sys/dev/usb/uhidev.c b/sys/dev/usb/uhidev.c index ebcda07ef9f..26b5b04088d 100644 --- a/sys/dev/usb/uhidev.c +++ b/sys/dev/usb/uhidev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uhidev.c,v 1.107 2022/03/21 12:18:52 thfr Exp $ */ +/* $OpenBSD: uhidev.c,v 1.108 2022/05/20 05:03:45 anton Exp $ */ /* $NetBSD: uhidev.c,v 1.14 2003/03/11 16:44:00 augustss Exp $ */ /* @@ -366,7 +366,7 @@ uhidev_maxrepid(void *buf, int len) maxid = -1; h.report_ID = 0; - for (d = hid_start_parse(buf, len, hid_none); hid_get_item(d, &h); ) + for (d = hid_start_parse(buf, len, hid_all); hid_get_item(d, &h);) if (h.report_ID > maxid) maxid = h.report_ID; hid_end_parse(d); -- 2.20.1