Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/fdc/fdc_pccard.c
Show First 20 Lines • Show All 50 Lines • ▼ Show 20 Lines | |||||
static int | static int | ||||
fdc_pccard_alloc_resources(device_t dev, struct fdc_data *fdc) | fdc_pccard_alloc_resources(device_t dev, struct fdc_data *fdc) | ||||
{ | { | ||||
struct resource *res; | struct resource *res; | ||||
int rid, i; | int rid, i; | ||||
rid = 0; | rid = 0; | ||||
res = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, 0ul, ~0ul, 1, | res = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid, RF_ACTIVE); | ||||
RF_ACTIVE); | |||||
if (res == NULL) { | if (res == NULL) { | ||||
device_printf(dev, "cannot alloc I/O port range\n"); | device_printf(dev, "cannot alloc I/O port range\n"); | ||||
return (ENXIO); | return (ENXIO); | ||||
} | } | ||||
for (i = 0; i < FDC_MAXREG; i++) { | for (i = 0; i < FDC_MAXREG; i++) { | ||||
fdc->resio[i] = res; | fdc->resio[i] = res; | ||||
fdc->ridio[i] = rid; | fdc->ridio[i] = rid; | ||||
fdc->ioff[i] = i; | fdc->ioff[i] = i; | ||||
▲ Show 20 Lines • Show All 74 Lines • Show Last 20 Lines |