summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/ugold.c
diff options
context:
space:
mode:
authorjcs <jcs@openbsd.org>2021-03-08 14:35:57 +0000
committerjcs <jcs@openbsd.org>2021-03-08 14:35:57 +0000
commitf31b43ced9cf4cbf056e9d8aceb4fa40a73e00cd (patch)
tree670c914d5d75c8a83558b027517932f0b5f45902 /sys/dev/usb/ugold.c
parentAdd support for sdhc(4) on Raspberry Pi in ACPI mode. (diff)
downloadwireguard-openbsd-f31b43ced9cf4cbf056e9d8aceb4fa40a73e00cd.tar.xz
wireguard-openbsd-f31b43ced9cf4cbf056e9d8aceb4fa40a73e00cd.zip
Allow uhidev child devices to claim selective report ids
There may be multiple matching devices on a single uhidev device but the first device that responds to UHIDEV_CLAIM_ALLREPORTID will block the others from attaching. Change this to UHIDEV_CLAIM_MULTIPLE_REPORTID and require any devices wanting some/all report ids to fill in the claimed array in uhidev_attach_arg with just the reports it needs. uhidev can then run match routines for other drivers with the available report ids. ok anton
Diffstat (limited to 'sys/dev/usb/ugold.c')
-rw-r--r--sys/dev/usb/ugold.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/usb/ugold.c b/sys/dev/usb/ugold.c
index bc2d84ca42e..c939966760e 100644
--- a/sys/dev/usb/ugold.c
+++ b/sys/dev/usb/ugold.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ugold.c,v 1.15 2020/08/17 04:26:57 gnezdo Exp $ */
+/* $OpenBSD: ugold.c,v 1.16 2021/03/08 14:35:57 jcs Exp $ */
/*
* Copyright (c) 2013 Takayoshi SASANO <uaa@openbsd.org>
@@ -110,7 +110,7 @@ ugold_match(struct device *parent, void *match, void *aux)
int size;
void *desc;
- if (uha->reportid == UHIDEV_CLAIM_ALLREPORTID)
+ if (uha->reportid == UHIDEV_CLAIM_MULTIPLE_REPORTID)
return (UMATCH_NONE);
if (usb_lookup(ugold_devs, uha->uaa->vendor, uha->uaa->product) == NULL)