summaryrefslogtreecommitdiffstats
path: root/sys/pc98/cbus/fdc.c
diff options
context:
space:
mode:
authornjl <njl@FreeBSD.org>2004-03-17 17:50:55 +0000
committernjl <njl@FreeBSD.org>2004-03-17 17:50:55 +0000
commit05a1f56fc999f634406946e831eea6deaaa75a99 (patch)
treea1c3f00139d832c8e80338cfc56c8b1aaffd88ab /sys/pc98/cbus/fdc.c
parent2283471bb53a546e9d7dfb662c8db5ca06907c85 (diff)
downloadFreeBSD-src-05a1f56fc999f634406946e831eea6deaaa75a99.zip
FreeBSD-src-05a1f56fc999f634406946e831eea6deaaa75a99.tar.gz
Convert callers to the new bus_alloc_resource_any(9) API.
Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde
Diffstat (limited to 'sys/pc98/cbus/fdc.c')
-rw-r--r--sys/pc98/cbus/fdc.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/sys/pc98/cbus/fdc.c b/sys/pc98/cbus/fdc.c
index c3a4dde..72680f3 100644
--- a/sys/pc98/cbus/fdc.c
+++ b/sys/pc98/cbus/fdc.c
@@ -925,8 +925,8 @@ fdc_alloc_resources(struct fdc_data *fdc)
#ifdef PC98
rid = 3;
bus_set_resource(dev, SYS_RES_IOPORT, rid, IO_FDPORT, 1);
- fdc->res_fdsio = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, 0, ~0,
- 1, RF_ACTIVE);
+ fdc->res_fdsio = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid,
+ RF_ACTIVE);
if (fdc->res_fdsio == 0)
return ENXIO;
fdc->sc_fdsiot = rman_get_bustag(fdc->res_fdsio);
@@ -934,8 +934,8 @@ fdc_alloc_resources(struct fdc_data *fdc)
rid = 4;
bus_set_resource(dev, SYS_RES_IOPORT, rid, 0x4be, 1);
- fdc->res_fdemsio = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, 0, ~0,
- 1, RF_ACTIVE);
+ fdc->res_fdemsio = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid,
+ RF_ACTIVE);
if (fdc->res_fdemsio == 0)
return ENXIO;
fdc->sc_fdemsiot = rman_get_bustag(fdc->res_fdemsio);
@@ -980,9 +980,8 @@ fdc_alloc_resources(struct fdc_data *fdc)
* Now (finally!) allocate the control port.
*/
fdc->rid_ctl = 1;
- fdc->res_ctl = bus_alloc_resource(dev, SYS_RES_IOPORT,
- &fdc->rid_ctl,
- 0ul, ~0ul, 1, RF_ACTIVE);
+ fdc->res_ctl = bus_alloc_resource_any(dev, SYS_RES_IOPORT,
+ &fdc->rid_ctl, RF_ACTIVE);
if (fdc->res_ctl == 0) {
device_printf(dev,
"cannot reserve control I/O port range (control port)\n");
@@ -993,18 +992,16 @@ fdc_alloc_resources(struct fdc_data *fdc)
}
#endif
- fdc->res_irq = bus_alloc_resource(dev, SYS_RES_IRQ,
- &fdc->rid_irq, 0ul, ~0ul, 1,
- RF_ACTIVE);
+ fdc->res_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ,
+ &fdc->rid_irq, RF_ACTIVE);
if (fdc->res_irq == 0) {
device_printf(dev, "cannot reserve interrupt line\n");
return ENXIO;
}
if ((fdc->flags & FDC_NODMA) == 0) {
- fdc->res_drq = bus_alloc_resource(dev, SYS_RES_DRQ,
- &fdc->rid_drq, 0ul, ~0ul, 1,
- RF_ACTIVE);
+ fdc->res_drq = bus_alloc_resource_any(dev, SYS_RES_DRQ,
+ &fdc->rid_drq, RF_ACTIVE);
if (fdc->res_drq == 0) {
device_printf(dev, "cannot reserve DMA request line\n");
return ENXIO;
OpenPOWER on IntegriCloud