diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2014-03-19 08:59:38 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2014-03-19 08:59:38 +0000 |
commit | d1669317a6061f891563c1bbbd503b2e45d077c0 (patch) | |
tree | c990ec5e2bf09e26c116561c8fa30ef3aace7b63 /sys/dev/usb/utrh.c | |
parent | 28c348dc9a8d89d1383d58a02ca11268337de586 (diff) |
Add a temporary hack to let a subdriver claim all the reportIDs of
a device. This should be removed once all the drivers attaching to
uhidev(4) are converted.
ok andre@, sthen@
Diffstat (limited to 'sys/dev/usb/utrh.c')
-rw-r--r-- | sys/dev/usb/utrh.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/usb/utrh.c b/sys/dev/usb/utrh.c index 0ba3cfd82ea..5fc8b92e5d2 100644 --- a/sys/dev/usb/utrh.c +++ b/sys/dev/usb/utrh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: utrh.c,v 1.12 2014/03/07 18:39:02 mpi Exp $ */ +/* $OpenBSD: utrh.c,v 1.13 2014/03/19 08:59:37 mpi Exp $ */ /* * Copyright (c) 2009 Yojiro UO <yuo@nui.org> @@ -92,8 +92,10 @@ const struct cfattach utrh_ca = { int utrh_match(struct device *parent, void *match, void *aux) { - struct usb_attach_arg *uaa = aux; - struct uhidev_attach_arg *uha = (struct uhidev_attach_arg *)uaa; + struct uhidev_attach_arg *uha = aux; + + if (uha->reportid == UHIDEV_CLAIM_ALLREPORTID) + return (UMATCH_NONE); return (usb_lookup(utrh_devs, uha->uaa->vendor, uha->uaa->product) != NULL ? UMATCH_VENDOR_PRODUCT : UMATCH_NONE); |