--- src/sys/dev/netif/an/if_an_pci.c 2005/06/15 11:35:22 1.12 +++ src/sys/dev/netif/an/if_an_pci.c 2005/07/27 21:56:32 1.13 @@ -111,7 +111,6 @@ static struct an_type an_devs[] = { static int an_probe_pci (device_t); static int an_attach_pci (device_t); -static int an_detach_pci (device_t); static int an_suspend_pci (device_t); static int an_resume_pci (device_t); @@ -239,21 +238,6 @@ fail: } static int -an_detach_pci(device_t dev) -{ - struct an_softc *sc = device_get_softc(dev); - struct ifnet *ifp = &sc->arpcom.ac_if; - - an_stop(sc); - ifmedia_removeall(&sc->an_ifmedia); - ether_ifdetach(ifp); - bus_teardown_intr(dev, sc->irq_res, sc->irq_handle); - an_release_resources(dev); - - return (0); -} - -static int an_suspend_pci(device_t dev) { an_shutdown(dev); @@ -273,7 +257,7 @@ static device_method_t an_pci_methods[] /* Device interface */ DEVMETHOD(device_probe, an_probe_pci), DEVMETHOD(device_attach, an_attach_pci), - DEVMETHOD(device_detach, an_detach_pci), + DEVMETHOD(device_detach, an_detach), DEVMETHOD(device_shutdown, an_shutdown), DEVMETHOD(device_suspend, an_suspend_pci), DEVMETHOD(device_resume, an_resume_pci),