diff options
author | Damien Bergamini <damien@cvs.openbsd.org> | 2006-10-23 18:19:27 +0000 |
---|---|---|
committer | Damien Bergamini <damien@cvs.openbsd.org> | 2006-10-23 18:19:27 +0000 |
commit | 749f214f42255b2e9cb5530a47a37d419b02e670 (patch) | |
tree | 7ab5a6ff636f938cc05f9b877fb66cfd0f91a5cc | |
parent | 172e852c3ebb0b306c0a9ecdf5d94443e6e8fd02 (diff) |
remove detach() function. this is not hotplug and this is dead code.
-rw-r--r-- | sys/dev/pci/if_ipw.c | 28 | ||||
-rw-r--r-- | sys/dev/pci/if_iwi.c | 32 | ||||
-rw-r--r-- | sys/dev/pci/if_wpi.c | 35 |
3 files changed, 6 insertions, 89 deletions
diff --git a/sys/dev/pci/if_ipw.c b/sys/dev/pci/if_ipw.c index 78c76bea317..c2efcddbcbe 100644 --- a/sys/dev/pci/if_ipw.c +++ b/sys/dev/pci/if_ipw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ipw.c,v 1.63 2006/09/18 16:20:20 damien Exp $ */ +/* $OpenBSD: if_ipw.c,v 1.64 2006/10/23 18:19:26 damien Exp $ */ /*- * Copyright (c) 2004-2006 @@ -78,7 +78,6 @@ static const struct ieee80211_rateset ipw_rateset_11b = int ipw_match(struct device *, void *, void *); void ipw_attach(struct device *, struct device *, void *); -int ipw_detach(struct device *, int); void ipw_power(int, void *); int ipw_dma_alloc(struct ipw_softc *); void ipw_release(struct ipw_softc *); @@ -143,7 +142,7 @@ int ipw_debug = 0; #endif struct cfattach ipw_ca = { - sizeof (struct ipw_softc), ipw_match, ipw_attach, ipw_detach + sizeof (struct ipw_softc), ipw_match, ipw_attach }; int @@ -298,29 +297,6 @@ ipw_attach(struct device *parent, struct device *self, void *aux) #endif } -int -ipw_detach(struct device *self, int flags) -{ - struct ipw_softc *sc = (struct ipw_softc *)self; - struct ifnet *ifp = &sc->sc_ic.ic_if; - - ipw_stop(ifp, 1); - - ieee80211_ifdetach(ifp); - if_detach(ifp); - - ipw_release(sc); - - if (sc->sc_ih != NULL) { - pci_intr_disestablish(sc->sc_pct, sc->sc_ih); - sc->sc_ih = NULL; - } - - bus_space_unmap(sc->sc_st, sc->sc_sh, sc->sc_sz); - - return 0; -} - void ipw_power(int why, void *arg) { diff --git a/sys/dev/pci/if_iwi.c b/sys/dev/pci/if_iwi.c index a80a74d9bfd..3b7c0498a12 100644 --- a/sys/dev/pci/if_iwi.c +++ b/sys/dev/pci/if_iwi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwi.c,v 1.76 2006/10/22 08:25:43 damien Exp $ */ +/* $OpenBSD: if_iwi.c,v 1.77 2006/10/23 18:19:26 damien Exp $ */ /*- * Copyright (c) 2004-2006 @@ -94,7 +94,6 @@ static const struct ieee80211_rateset iwi_rateset_11g = int iwi_match(struct device *, void *, void *); void iwi_attach(struct device *, struct device *, void *); -int iwi_detach(struct device *, int); void iwi_power(int, void *); int iwi_alloc_cmd_ring(struct iwi_softc *, struct iwi_cmd_ring *); void iwi_reset_cmd_ring(struct iwi_softc *, struct iwi_cmd_ring *); @@ -160,7 +159,7 @@ int iwi_debug = 0; #endif struct cfattach iwi_ca = { - sizeof (struct iwi_softc), iwi_match, iwi_attach, iwi_detach + sizeof (struct iwi_softc), iwi_match, iwi_attach }; int @@ -373,33 +372,6 @@ fail2: iwi_free_tx_ring(sc, &sc->txq[0]); fail1: iwi_free_cmd_ring(sc, &sc->cmdq); } -int -iwi_detach(struct device *self, int flags) -{ - struct iwi_softc *sc = (struct iwi_softc *)self; - struct ifnet *ifp = &sc->sc_ic.ic_if; - int i; - - iwi_stop(ifp, 1); - - ieee80211_ifdetach(ifp); - if_detach(ifp); - - iwi_free_cmd_ring(sc, &sc->cmdq); - for (i = 0; i < 4; i++) - iwi_free_tx_ring(sc, &sc->txq[i]); - iwi_free_rx_ring(sc, &sc->rxq); - - if (sc->sc_ih != NULL) { - pci_intr_disestablish(sc->sc_pct, sc->sc_ih); - sc->sc_ih = NULL; - } - - bus_space_unmap(sc->sc_st, sc->sc_sh, sc->sc_sz); - - return 0; -} - void iwi_power(int why, void *arg) { diff --git a/sys/dev/pci/if_wpi.c b/sys/dev/pci/if_wpi.c index 68f2369737f..e3cc5ed5bbd 100644 --- a/sys/dev/pci/if_wpi.c +++ b/sys/dev/pci/if_wpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wpi.c,v 1.33 2006/10/23 18:16:56 damien Exp $ */ +/* $OpenBSD: if_wpi.c,v 1.34 2006/10/23 18:19:26 damien Exp $ */ /*- * Copyright (c) 2006 @@ -88,7 +88,6 @@ static const uint8_t wpi_ridx_to_plcp[] = { int wpi_match(struct device *, void *, void *); void wpi_attach(struct device *, struct device *, void *); -int wpi_detach(struct device *, int); void wpi_power(int, void *); int wpi_dma_contig_alloc(bus_dma_tag_t, struct wpi_dma_info *, void **, bus_size_t, bus_size_t, int); @@ -163,7 +162,7 @@ int wpi_debug = 1; #endif struct cfattach wpi_ca = { - sizeof (struct wpi_softc), wpi_match, wpi_attach, wpi_detach + sizeof (struct wpi_softc), wpi_match, wpi_attach }; int @@ -374,36 +373,6 @@ fail2: while (--ac >= 0) fail1: wpi_free_shared(sc); } -int -wpi_detach(struct device *self, int flags) -{ - struct wpi_softc *sc = (struct wpi_softc *)self; - struct ifnet *ifp = &sc->sc_ic.ic_if; - int ac; - - wpi_stop(ifp, 1); - - ieee80211_ifdetach(ifp); - if_detach(ifp); - - for (ac = 0; ac < 4; ac++) - wpi_free_tx_ring(sc, &sc->txq[ac]); - wpi_free_tx_ring(sc, &sc->cmdq); - wpi_free_tx_ring(sc, &sc->svcq); - wpi_free_rx_ring(sc, &sc->rxq); - wpi_free_rpool(sc); - wpi_free_shared(sc); - - if (sc->sc_ih != NULL) { - pci_intr_disestablish(sc->sc_pct, sc->sc_ih); - sc->sc_ih = NULL; - } - - bus_space_unmap(sc->sc_st, sc->sc_sh, sc->sc_sz); - - return 0; -} - void wpi_power(int why, void *arg) { |