diff options
| author | dyoung <dyoung@NetBSD.org> | 2009-11-12 20:28:32 +0000 |
|---|---|---|
| committer | dyoung <dyoung@NetBSD.org> | 2009-11-12 20:28:32 +0000 |
| commit | bb858bb7d51bec4c3e2887f4479a2e47e98e7ff9 (patch) | |
| tree | 851757688707f174673a1663b2d186c79a6cddb5 /sys/dev/isa/com_isa.c | |
| parent | 8e38167faa89a0c14bd11a8eea44c0b3d567855b (diff) | |
Call the common detach routine, com_detach(), and get out on error,
before starting the bus-specific detachment.
com_activate() is going away, so don't use it any more.
Diffstat (limited to 'sys/dev/isa/com_isa.c')
| -rw-r--r-- | sys/dev/isa/com_isa.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/isa/com_isa.c b/sys/dev/isa/com_isa.c index 7457818147e..10ef0c5a494 100644 --- a/sys/dev/isa/com_isa.c +++ b/sys/dev/isa/com_isa.c @@ -1,4 +1,4 @@ -/* $NetBSD: com_isa.c,v 1.35 2009/04/02 00:09:33 dyoung Exp $ */ +/* $NetBSD: com_isa.c,v 1.36 2009/11/12 20:28:32 dyoung Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -61,7 +61,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: com_isa.c,v 1.35 2009/04/02 00:09:33 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: com_isa.c,v 1.36 2009/11/12 20:28:32 dyoung Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -108,7 +108,7 @@ int com_isa_isHAYESP(bus_space_handle_t, struct com_softc *); CFATTACH_DECL3_NEW(com_isa, sizeof(struct com_isa_softc), - com_isa_probe, com_isa_attach, com_isa_detach, com_activate, + com_isa_probe, com_isa_attach, com_isa_detach, NULL, NULL, NULL, DVF_DETACH_SHUTDOWN); int @@ -252,14 +252,14 @@ com_isa_detach(device_t self, int flags) const struct com_regs *cr = &sc->sc_regs; int rc; + if ((rc = com_detach(self, flags)) != 0) + return rc; + if (isc->sc_ih != NULL) isa_intr_disestablish(isc->sc_ic, isc->sc_ih); pmf_device_deregister(self); - if ((rc = com_detach(self, flags)) != 0) - return rc; - com_cleanup(self, 0); #ifdef COM_HAYESP |
