summaryrefslogtreecommitdiffstats
path: root/sys/dev/dpt
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/dev/dpt
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/dev/dpt')
-rw-r--r--sys/dev/dpt/dpt_isa.c4
-rw-r--r--sys/dev/dpt/dpt_pci.c14
-rw-r--r--sys/dev/dpt/dpt_scsi.c8
3 files changed, 12 insertions, 14 deletions
diff --git a/sys/dev/dpt/dpt_isa.c b/sys/dev/dpt/dpt_isa.c
index 0cf97be..c0ede88 100644
--- a/sys/dev/dpt/dpt_isa.c
+++ b/sys/dev/dpt/dpt_isa.c
@@ -167,8 +167,8 @@ dpt_isa_attach (device_t dev)
}
dpt->drq_rid = 0;
- dpt->drq_res = bus_alloc_resource(dev, SYS_RES_DRQ, &dpt->drq_rid,
- 0, ~0, 1, RF_ACTIVE);
+ dpt->drq_res = bus_alloc_resource_any(dev, SYS_RES_DRQ, &dpt->drq_rid,
+ RF_ACTIVE);
if (!dpt->drq_res) {
device_printf(dev, "No DRQ!\n");
error = ENOMEM;
diff --git a/sys/dev/dpt/dpt_pci.c b/sys/dev/dpt/dpt_pci.c
index 445606e..7385215 100644
--- a/sys/dev/dpt/dpt_pci.c
+++ b/sys/dev/dpt/dpt_pci.c
@@ -90,17 +90,15 @@ dpt_pci_attach (device_t dev)
if ((command & PCIM_CMD_MEMEN) != 0) {
dpt->io_rid = DPT_PCI_MEMADDR;
dpt->io_type = SYS_RES_MEMORY;
- dpt->io_res = bus_alloc_resource(dev, dpt->io_type,
- &dpt->io_rid,
- 0, ~0, 1, RF_ACTIVE);
+ dpt->io_res = bus_alloc_resource_any(dev, dpt->io_type,
+ &dpt->io_rid, RF_ACTIVE);
}
#endif
if (dpt->io_res == NULL && (command & PCIM_CMD_PORTEN) != 0) {
dpt->io_rid = DPT_PCI_IOADDR;
dpt->io_type = SYS_RES_IOPORT;
- dpt->io_res = bus_alloc_resource(dev, dpt->io_type,
- &dpt->io_rid,
- 0, ~0, 1, RF_ACTIVE);
+ dpt->io_res = bus_alloc_resource_any(dev, dpt->io_type,
+ &dpt->io_rid, RF_ACTIVE);
}
if (dpt->io_res == NULL) {
@@ -111,8 +109,8 @@ dpt_pci_attach (device_t dev)
dpt->io_offset = 0x10;
dpt->irq_rid = 0;
- dpt->irq_res = bus_alloc_resource(dev, SYS_RES_IRQ, &dpt->irq_rid,
- 0, ~0, 1, RF_ACTIVE | RF_SHAREABLE);
+ dpt->irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &dpt->irq_rid,
+ RF_ACTIVE | RF_SHAREABLE);
if (dpt->irq_res == NULL) {
device_printf(dev, "No irq?!\n");
error = ENOMEM;
diff --git a/sys/dev/dpt/dpt_scsi.c b/sys/dev/dpt/dpt_scsi.c
index 533ac93..5925687 100644
--- a/sys/dev/dpt/dpt_scsi.c
+++ b/sys/dev/dpt/dpt_scsi.c
@@ -1225,16 +1225,16 @@ dpt_alloc_resources (device_t dev)
dpt = device_get_softc(dev);
- dpt->io_res = bus_alloc_resource(dev, dpt->io_type, &dpt->io_rid,
- 0, ~0, 1, RF_ACTIVE);
+ dpt->io_res = bus_alloc_resource_any(dev, dpt->io_type, &dpt->io_rid,
+ RF_ACTIVE);
if (dpt->io_res == NULL) {
device_printf(dev, "No I/O space?!\n");
error = ENOMEM;
goto bad;
}
- dpt->irq_res = bus_alloc_resource(dev, SYS_RES_IRQ, &dpt->irq_rid,
- 0, ~0, 1, RF_ACTIVE);
+ dpt->irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &dpt->irq_rid,
+ RF_ACTIVE);
if (dpt->irq_res == NULL) {
device_printf(dev, "No IRQ!\n");
error = ENOMEM;
OpenPOWER on IntegriCloud