--- src/sys/dev/netif/cs/if_cs_pccard.c 2005/05/24 20:59:01 1.6 +++ src/sys/dev/netif/cs/if_cs_pccard.c 2005/09/02 12:51:00 1.7 @@ -75,43 +75,16 @@ cs_pccard_probe(device_t dev) return (error); } -static int -cs_pccard_attach(device_t dev) -{ - struct cs_softc *sc = device_get_softc(dev); - int error; - - if (sc->port_used > 0) - cs_alloc_port(dev, sc->port_rid, sc->port_used); - if (sc->mem_used) - cs_alloc_memory(dev, sc->mem_rid, sc->mem_used); - error = cs_alloc_irq(dev, sc->irq_rid, 0); - if (error != 0) - goto bad; - - error = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_NET, - csintr, sc, &sc->irq_handle, NULL); - if (error != 0) - goto bad; - - return (cs_attach(dev)); -bad: - cs_release_resources(dev); - return (error); -} - static device_method_t cs_pccard_methods[] = { /* Device interface */ DEVMETHOD(device_probe, pccard_compat_probe), DEVMETHOD(device_attach, pccard_compat_attach), -#ifdef CS_HAS_DETACH DEVMETHOD(device_detach, cs_detach), -#endif /* Card interface */ DEVMETHOD(card_compat_match, cs_pccard_match), DEVMETHOD(card_compat_probe, cs_pccard_probe), - DEVMETHOD(card_compat_attach, cs_pccard_attach), + DEVMETHOD(card_compat_attach, cs_attach), { 0, 0 } };