From bb858bb7d51bec4c3e2887f4479a2e47e98e7ff9 Mon Sep 17 00:00:00 2001 From: dyoung Date: Thu, 12 Nov 2009 20:28:32 +0000 Subject: 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. --- sys/dev/isa/com_isa.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'sys/dev') 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 -__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 #include @@ -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 -- cgit value='range'>range
AgeCommit message (Expand)Author
2007-02-09Merge newlock2 to head.ad