-/* $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 $ */
/*
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 *);
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++) {
/*
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;
}
}
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)
{
-/* $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 $ */
/*
* 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;