diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2014-07-12 07:59:24 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2014-07-12 07:59:24 +0000 |
commit | c42990f7fe2d5e525cb71475adda2d077752403c (patch) | |
tree | 422f980b1cbe42a1682bfaaf0f0bc115abc8f7b9 /sys/dev/usb/if_run.c | |
parent | b85e6728e53b3d131aae17def481c2684a281c24 (diff) |
Kill a bunch of DVACT_DEACTIVATE handlers whose only purpose were to
set the 'dying' flag of a device. Such handlers are useless now that
usbd_detach() already set this flag.
Even if the purpose of this flag is questionnable on OpenBSD because
DVACT_DEACTIVATE acts as a pre-detach event, this is just a first small
step towards the simplification of the autoconf(9) device states.
This cleaning is now possible thanks to the work of pirofti@ to convert
all the USB drivers to properly use usbd_is_dying().
Discussed many times with deraadt@
Diffstat (limited to 'sys/dev/usb/if_run.c')
-rw-r--r-- | sys/dev/usb/if_run.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/sys/dev/usb/if_run.c b/sys/dev/usb/if_run.c index 13a4f28c694..7d4f81496f0 100644 --- a/sys/dev/usb/if_run.c +++ b/sys/dev/usb/if_run.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_run.c,v 1.100 2014/06/13 21:47:02 stsp Exp $ */ +/* $OpenBSD: if_run.c,v 1.101 2014/07/12 07:59:23 mpi Exp $ */ /*- * Copyright (c) 2008-2010 Damien Bergamini <damien.bergamini@free.fr> @@ -330,7 +330,6 @@ static const struct usb_devno run_devs[] = { int run_match(struct device *, void *, void *); void run_attach(struct device *, struct device *, void *); int run_detach(struct device *, int); -int run_activate(struct device *, int); int run_alloc_rx_ring(struct run_softc *); void run_free_rx_ring(struct run_softc *); int run_alloc_tx_ring(struct run_softc *, int); @@ -429,8 +428,7 @@ struct cfdriver run_cd = { }; const struct cfattach run_ca = { - sizeof (struct run_softc), run_match, run_attach, run_detach, - run_activate + sizeof (struct run_softc), run_match, run_attach, run_detach }; static const struct { @@ -4819,17 +4817,3 @@ run_stop(struct ifnet *ifp, int disable) run_free_tx_ring(sc, qid); run_free_rx_ring(sc); } - -int -run_activate(struct device *self, int act) -{ - struct run_softc *sc = (struct run_softc *)self; - - switch (act) { - case DVACT_DEACTIVATE: - usbd_deactivate(sc->sc_udev); - break; - } - - return 0; -} |