Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/nsp/nsp_pccard.c
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | |||||
sc->mem_rid, sc->mem_res); | sc->mem_rid, sc->mem_res); | ||||
mtx_destroy(&sc->sc_sclow.sl_lock); | mtx_destroy(&sc->sc_sclow.sl_lock); | ||||
} | } | ||||
static int | static int | ||||
nsp_alloc_resource(device_t dev) | nsp_alloc_resource(device_t dev) | ||||
{ | { | ||||
struct nsp_softc *sc = device_get_softc(dev); | struct nsp_softc *sc = device_get_softc(dev); | ||||
u_long ioaddr, iosize, maddr, msize; | rman_res_t ioaddr, iosize, maddr, msize; | ||||
int error; | int error; | ||||
error = bus_get_resource(dev, SYS_RES_IOPORT, 0, &ioaddr, &iosize); | error = bus_get_resource(dev, SYS_RES_IOPORT, 0, &ioaddr, &iosize); | ||||
if (error || iosize < NSP_IOSIZE) | if (error || iosize < NSP_IOSIZE) | ||||
return(ENOMEM); | return(ENOMEM); | ||||
mtx_init(&sc->sc_sclow.sl_lock, "nsp", NULL, MTX_DEF); | mtx_init(&sc->sc_sclow.sl_lock, "nsp", NULL, MTX_DEF); | ||||
sc->port_rid = 0; | sc->port_rid = 0; | ||||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |