Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/aic/aic_pccard.c
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | |||||
{ | { | ||||
struct aic_pccard_softc *sc = device_get_softc(dev); | struct aic_pccard_softc *sc = device_get_softc(dev); | ||||
int rid; | int rid; | ||||
sc->sc_port = sc->sc_irq = NULL; | sc->sc_port = sc->sc_irq = NULL; | ||||
rid = 0; | rid = 0; | ||||
sc->sc_port = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, | sc->sc_port = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, | ||||
0ul, ~0ul, AIC_PCCARD_PORTSIZE, RF_ACTIVE); | 0, ~0, AIC_PCCARD_PORTSIZE, RF_ACTIVE); | ||||
if (!sc->sc_port) | if (!sc->sc_port) | ||||
return (ENOMEM); | return (ENOMEM); | ||||
rid = 0; | rid = 0; | ||||
sc->sc_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE); | sc->sc_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE); | ||||
if (!sc->sc_irq) { | if (!sc->sc_irq) { | ||||
aic_pccard_release_resources(dev); | aic_pccard_release_resources(dev); | ||||
return (ENOMEM); | return (ENOMEM); | ||||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |