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_aue.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_aue.c')
-rw-r--r-- | sys/dev/usb/if_aue.c | 42 |
1 files changed, 11 insertions, 31 deletions
diff --git a/sys/dev/usb/if_aue.c b/sys/dev/usb/if_aue.c index 8e8b3bf1702..a4b2c2c149c 100644 --- a/sys/dev/usb/if_aue.c +++ b/sys/dev/usb/if_aue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_aue.c,v 1.92 2013/12/13 01:13:56 brad Exp $ */ +/* $OpenBSD: if_aue.c,v 1.93 2014/07/12 07:59:23 mpi Exp $ */ /* $NetBSD: if_aue.c,v 1.82 2003/03/05 17:37:36 shiba Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 @@ -209,21 +209,16 @@ const struct aue_type aue_devs[] = { }; #define aue_lookup(v, p) ((struct aue_type *)usb_lookup(aue_devs, v, p)) -int aue_match(struct device *, void *, void *); -void aue_attach(struct device *, struct device *, void *); -int aue_detach(struct device *, int); -int aue_activate(struct device *, int); - -struct cfdriver aue_cd = { - NULL, "aue", DV_IFNET -}; - -const struct cfattach aue_ca = { - sizeof(struct aue_softc), - aue_match, - aue_attach, - aue_detach, - aue_activate, +int aue_match(struct device *, void *, void *); +void aue_attach(struct device *, struct device *, void *); +int aue_detach(struct device *, int); + +struct cfdriver aue_cd = { + NULL, "aue", DV_IFNET +}; + +const struct cfattach aue_ca = { + sizeof(struct aue_softc), aue_match, aue_attach, aue_detach }; void aue_reset_pegasus_II(struct aue_softc *sc); @@ -882,21 +877,6 @@ aue_detach(struct device *self, int flags) return (0); } -int -aue_activate(struct device *self, int act) -{ - struct aue_softc *sc = (struct aue_softc *)self; - - DPRINTFN(2,("%s: %s: enter\n", sc->aue_dev.dv_xname, __func__)); - - switch (act) { - case DVACT_DEACTIVATE: - usbd_deactivate(sc->aue_udev); - break; - } - return (0); -} - /* * Initialize an RX descriptor and attach an MBUF cluster. */ |