summaryrefslogtreecommitdiffstats
path: root/sys/dev/ips
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/ips
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/ips')
-rw-r--r--sys/dev/ips/ips_pci.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/dev/ips/ips_pci.c b/sys/dev/ips/ips_pci.c
index c4a2db3..80681c7 100644
--- a/sys/dev/ips/ips_pci.c
+++ b/sys/dev/ips/ips_pci.c
@@ -92,13 +92,15 @@ static int ips_pci_attach(device_t dev)
else
sc->rid = PCIR_BAR(1);
sc->iotype = SYS_RES_MEMORY;
- sc->iores = bus_alloc_resource(dev, sc->iotype, &sc->rid, 0, ~0, 1, RF_ACTIVE);
+ sc->iores = bus_alloc_resource_any(dev, sc->iotype,
+ &sc->rid, RF_ACTIVE);
}
if(!sc->iores && command & PCIM_CMD_PORTEN){
PRINTF(10, "trying PORTIO\n");
sc->rid = PCIR_BAR(0);
sc->iotype = SYS_RES_IOPORT;
- sc->iores = bus_alloc_resource(dev, sc->iotype, &sc->rid, 0, ~0, 1, RF_ACTIVE);
+ sc->iores = bus_alloc_resource_any(dev, sc->iotype,
+ &sc->rid, RF_ACTIVE);
}
if(sc->iores == NULL){
device_printf(dev, "resource allocation failed\n");
@@ -108,7 +110,8 @@ static int ips_pci_attach(device_t dev)
sc->bushandle = rman_get_bushandle(sc->iores);
/*allocate an interrupt. when does the irq become active? after leaving attach? */
sc->irqrid = 0;
- if(!(sc->irqres = bus_alloc_resource(dev, SYS_RES_IRQ, &sc->irqrid, 0, ~0, 1, RF_SHAREABLE | RF_ACTIVE))){
+ if(!(sc->irqres = bus_alloc_resource_any(dev, SYS_RES_IRQ,
+ &sc->irqrid, RF_SHAREABLE | RF_ACTIVE))){
device_printf(dev, "irq allocation failed\n");
goto error;
}
OpenPOWER on IntegriCloud