summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_dc_pci.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2009-10-15 17:54:57 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2009-10-15 17:54:57 +0000
commite146ad033c7b64925ffa948f37bf1b536392e65c (patch)
treeebd18c972b363ff177bdd0820fa8d77bdaa2321e /sys/dev/pci/if_dc_pci.c
parent2faa5c93c1cb8fe9a551a57cbe7ccee57638b318 (diff)
Add detach support to a few more drivers, and in others do the neccessary
operations in the detach function in the right order. Also ensure that the interrupt handlers not trust registers that go away. read over very carefully by dms, tested by me
Diffstat (limited to 'sys/dev/pci/if_dc_pci.c')
-rw-r--r--sys/dev/pci/if_dc_pci.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/sys/dev/pci/if_dc_pci.c b/sys/dev/pci/if_dc_pci.c
index d6e19ca72af..76ab92df416 100644
--- a/sys/dev/pci/if_dc_pci.c
+++ b/sys/dev/pci/if_dc_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_dc_pci.c,v 1.64 2009/06/26 16:58:45 deraadt Exp $ */
+/* $OpenBSD: if_dc_pci.c,v 1.65 2009/10/15 17:54:56 deraadt Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -564,18 +564,13 @@ dc_pci_detach(struct device *self, int flags)
{
struct dc_pci_softc *psc = (void *)self;
struct dc_softc *sc = &psc->psc_softc;
- int rv = 0;
-
- rv = dc_detach(sc);
- if (rv)
- return (rv);
if (sc->sc_ih != NULL)
pci_intr_disestablish(psc->psc_pc, sc->sc_ih);
-
+ dc_detach(sc);
bus_space_unmap(sc->dc_btag, sc->dc_bhandle, psc->psc_mapsize);
- return (rv);
+ return (0);
}
struct cfattach dc_pci_ca = {