summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAnton Lindqvist <anton@cvs.openbsd.org>2021-11-09 06:25:43 +0000
committerAnton Lindqvist <anton@cvs.openbsd.org>2021-11-09 06:25:43 +0000
commite3068edd9ec627d2758cb5f078852fce7a0a0394 (patch)
tree61b1a5449ef88ba65928a6d42c3bfe3dbc829eea /sys
parentb8c4ff539d02a55e54d31b4bdb40c439989eb6d5 (diff)
The uhidevsubmatch() routine was imported from NetBSD back in 2002 along with
the reportid locator. The same locator was removed in 2004 making the routine redundant. ok gnezdo@ mpi@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/usb/uhidev.c18
-rw-r--r--sys/dev/usb/uhidev.h8
2 files changed, 4 insertions, 22 deletions
diff --git a/sys/dev/usb/uhidev.c b/sys/dev/usb/uhidev.c
index 7e196395d2f..1aafa12d220 100644
--- a/sys/dev/usb/uhidev.c
+++ b/sys/dev/usb/uhidev.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhidev.c,v 1.96 2021/11/08 07:05:21 anton Exp $ */
+/* $OpenBSD: uhidev.c,v 1.97 2021/11/09 06:25:42 anton Exp $ */
/* $NetBSD: uhidev.c,v 1.14 2003/03/11 16:44:00 augustss Exp $ */
/*
@@ -89,7 +89,6 @@ void uhidev_intr(struct usbd_xfer *, void *, usbd_status);
int uhidev_maxrepid(void *buf, int len);
int uhidevprint(void *aux, const char *pnp);
-int uhidevsubmatch(struct device *parent, void *cf, void *aux);
int uhidev_match(struct device *, void *, void *);
void uhidev_attach(struct device *, struct device *, void *);
@@ -254,7 +253,7 @@ uhidev_attach(struct device *parent, struct device *self, void *aux)
uha.claimed = malloc(nrepid, M_TEMP, M_WAITOK|M_ZERO);
/* Look for a driver claiming multiple report IDs first. */
- dev = config_found_sm(self, &uha, NULL, uhidevsubmatch);
+ dev = config_found_sm(self, &uha, NULL, NULL);
if (dev != NULL) {
for (repid = 0; repid < nrepid; repid++) {
/*
@@ -283,7 +282,7 @@ uhidev_attach(struct device *parent, struct device *self, void *aux)
continue;
uha.reportid = repid;
- dev = config_found_sm(self, &uha, uhidevprint, uhidevsubmatch);
+ dev = config_found_sm(self, &uha, uhidevprint, NULL);
sc->sc_subdevs[repid] = (struct uhidev *)dev;
}
}
@@ -366,17 +365,6 @@ uhidevprint(void *aux, const char *pnp)
return (UNCONF);
}
-int uhidevsubmatch(struct device *parent, void *match, void *aux)
-{
- struct uhidev_attach_arg *uha = aux;
- struct cfdata *cf = match;
-
- if (cf->uhidevcf_reportid != UHIDEV_UNK_REPORTID &&
- cf->uhidevcf_reportid != uha->reportid)
- return (0);
- return ((*cf->cf_attach->ca_match)(parent, cf, aux));
-}
-
int
uhidev_activate(struct device *self, int act)
{
diff --git a/sys/dev/usb/uhidev.h b/sys/dev/usb/uhidev.h
index 6ce75b1f49d..abc78dc72aa 100644
--- a/sys/dev/usb/uhidev.h
+++ b/sys/dev/usb/uhidev.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhidev.h,v 1.34 2021/10/30 11:56:19 ratchov Exp $ */
+/* $OpenBSD: uhidev.h,v 1.35 2021/11/09 06:25:42 anton Exp $ */
/* $NetBSD: uhidev.h,v 1.3 2002/10/08 09:56:17 dan Exp $ */
/*
@@ -31,12 +31,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#define UHIDBUSCF_REPORTID 0
-#define UHIDBUSCF_REPORTID_DEFAULT -1
-
-#define uhidevcf_reportid cf_loc[UHIDBUSCF_REPORTID]
-#define UHIDEV_UNK_REPORTID UHIDBUSCF_REPORTID_DEFAULT
-
struct uhidev_softc {
struct device sc_dev; /* base device */
struct usbd_device *sc_udev;