diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2013-05-07 08:44:39 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2013-05-07 08:44:39 +0000 |
commit | 0a7cd0edaf81d97a3de566af9ce8395645865ede (patch) | |
tree | f2d2e0766c83a163308227e0a4c9256f374da9ee /sys/dev/usb/uhidev.c | |
parent | 490371a9c5e671363aad96a473b6fc091ee360d6 (diff) |
When deactivating child devices do not panic if their driver does
not implement an *activate() function. This could receive more love
but is good enough for the moment to start cleaning useless *activate()
functions.
While here remove unused sc_dying argument.
Tested by and ok mglocker@
Diffstat (limited to 'sys/dev/usb/uhidev.c')
-rw-r--r-- | sys/dev/usb/uhidev.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/sys/dev/usb/uhidev.c b/sys/dev/usb/uhidev.c index a5777b8c9ad..2e8d377bece 100644 --- a/sys/dev/usb/uhidev.c +++ b/sys/dev/usb/uhidev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uhidev.c,v 1.43 2013/04/15 09:23:02 mglocker Exp $ */ +/* $OpenBSD: uhidev.c,v 1.44 2013/05/07 08:44:38 mpi Exp $ */ /* $NetBSD: uhidev.c,v 1.14 2003/03/11 16:44:00 augustss Exp $ */ /* @@ -145,7 +145,6 @@ uhidev_attach(struct device *parent, struct device *self, void *aux) if (ed == NULL) { printf("%s: could not read endpoint descriptor\n", sc->sc_dev.dv_xname); - sc->sc_dying = 1; return; } @@ -166,7 +165,6 @@ uhidev_attach(struct device *parent, struct device *self, void *aux) sc->sc_oep_addr = ed->bEndpointAddress; } else { printf("%s: unexpected endpoint\n", sc->sc_dev.dv_xname); - sc->sc_dying = 1; return; } } @@ -177,7 +175,6 @@ uhidev_attach(struct device *parent, struct device *self, void *aux) */ if (sc->sc_iep_addr == -1) { printf("%s: no input interrupt endpoint\n", sc->sc_dev.dv_xname); - sc->sc_dying = 1; return; } @@ -219,7 +216,6 @@ uhidev_attach(struct device *parent, struct device *self, void *aux) } if (err) { printf("%s: no report descriptor\n", sc->sc_dev.dv_xname); - sc->sc_dying = 1; return; } @@ -341,10 +337,9 @@ uhidev_activate(struct device *self, int act) if (sc->sc_subdevs[i] != NULL) { r = config_deactivate( &sc->sc_subdevs[i]->sc_dev); - if (r) + if (r && r != EOPNOTSUPP) rv = r; } - sc->sc_dying = 1; break; } return (rv); |