diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2007-05-08 20:33:08 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2007-05-08 20:33:08 +0000 |
commit | 67e72c3378f0d327f4e61685dbd9415d4c0731a2 (patch) | |
tree | a240efbd16546d5f55dec0ca140793857d3d3c94 /sys/arch/i386 | |
parent | 34fa57004f4b21f9d683f260f1af64d1be4ba445 (diff) |
put more foo_detach() routines where they are used
Diffstat (limited to 'sys/arch/i386')
-rw-r--r-- | sys/arch/i386/isa/pccom.c | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/sys/arch/i386/isa/pccom.c b/sys/arch/i386/isa/pccom.c index 9f4e9583d0e..303837c9a10 100644 --- a/sys/arch/i386/isa/pccom.c +++ b/sys/arch/i386/isa/pccom.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pccom.c,v 1.57 2007/02/15 18:39:26 mickey Exp $ */ +/* $OpenBSD: pccom.c,v 1.58 2007/05/08 20:33:07 deraadt Exp $ */ /* $NetBSD: com.c,v 1.82.4.1 1996/06/02 09:08:00 mrg Exp $ */ /* @@ -415,36 +415,6 @@ comattach(struct device *parent, struct device *self, void *aux) } int -com_detach(struct device *self, int flags) -{ - struct com_softc *sc = (struct com_softc *)self; - int maj, mn; - - /* locate the major number */ - for (maj = 0; maj < nchrdev; maj++) - if (cdevsw[maj].d_open == comopen) - break; - - /* Nuke the vnodes for any open instances. */ - mn = self->dv_unit; - vdevgone(maj, mn, mn, VCHR); - - /* XXX a symbolic constant for the cua bit would be nicer. */ - mn |= 0x80; - vdevgone(maj, mn, mn, VCHR); - - /* Detach and free the tty. */ - if (sc->sc_tty) { - ttyfree(sc->sc_tty); - } - - timeout_del(&sc->sc_dtr_tmo); - timeout_del(&sc->sc_diag_tmo); - - return (0); -} - -int com_activate(struct device *self, enum devact act) { struct com_softc *sc = (struct com_softc *)self; |