summaryrefslogtreecommitdiffstats
path: root/sys/isa/fd.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/isa/fd.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/isa/fd.c')
-rw-r--r--sys/isa/fd.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/sys/isa/fd.c b/sys/isa/fd.c
index 265ae1b..2dc88b9 100644
--- a/sys/isa/fd.c
+++ b/sys/isa/fd.c
@@ -762,9 +762,8 @@ fdc_alloc_resources(struct fdc_data *fdc)
/*
* Now (finally!) allocate the control port.
*/
- 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");
@@ -774,18 +773,17 @@ fdc_alloc_resources(struct fdc_data *fdc)
fdc->ctlh = rman_get_bushandle(fdc->res_ctl);
}
- 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