From e7f3461c0d32f50be1faee80585084b2971caf13 Mon Sep 17 00:00:00 2001 From: anton Date: Wed, 17 Nov 2021 06:22:14 +0000 Subject: [PATCH] uhidpp does claim multiple report ids --- sys/dev/usb/uhidpp.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/dev/usb/uhidpp.c b/sys/dev/usb/uhidpp.c index 23d70627dfc..84bfc994b88 100644 --- a/sys/dev/usb/uhidpp.c +++ b/sys/dev/usb/uhidpp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uhidpp.c,v 1.18 2021/08/17 11:30:45 anton Exp $ */ +/* $OpenBSD: uhidpp.c,v 1.19 2021/11/17 06:22:14 anton Exp $ */ /* * Copyright (c) 2021 Anton Lindqvist @@ -304,8 +304,7 @@ uhidpp_match(struct device *parent, void *match, void *aux) void *desc; int descsiz, siz; - if (uha->reportid != HIDPP_REPORT_ID_SHORT && - uha->reportid != HIDPP_REPORT_ID_LONG) + if (!UHIDEV_CLAIM_MULTIPLE_REPORTID(uha)) return UMATCH_NONE; if (usb_lookup(uhidpp_devs, @@ -320,6 +319,8 @@ uhidpp_match(struct device *parent, void *match, void *aux) if (siz != HIDPP_REPORT_LONG_LENGTH) return UMATCH_NONE; + uha->claimed[HIDPP_REPORT_ID_SHORT] = 1; + uha->claimed[HIDPP_REPORT_ID_LONG] = 1; return UMATCH_VENDOR_PRODUCT; } -- 2.20.1