From 05a1f56fc999f634406946e831eea6deaaa75a99 Mon Sep 17 00:00:00 2001 From: njl Date: Wed, 17 Mar 2004 17:50:55 +0000 Subject: Convert callers to the new bus_alloc_resource_any(9) API. Submitted by: Mark Santcroos Reviewed by: imp, dfr, bde --- sys/dev/vx/if_vx_eisa.c | 9 +++------ sys/dev/vx/if_vx_pci.c | 5 ++--- 2 files changed, 5 insertions(+), 9 deletions(-) (limited to 'sys/dev/vx') diff --git a/sys/dev/vx/if_vx_eisa.c b/sys/dev/vx/if_vx_eisa.c index 4c8931d..faf3f9d 100644 --- a/sys/dev/vx/if_vx_eisa.c +++ b/sys/dev/vx/if_vx_eisa.c @@ -122,16 +122,14 @@ vx_eisa_attach(device_t dev) * driver comes first. */ rid = 0; - io = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, - 0, ~0, 1, RF_ACTIVE); + io = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid, RF_ACTIVE); if (!io) { device_printf(dev, "No I/O space?!\n"); goto bad; } rid = 1; - eisa_io = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, - 0, ~0, 1, RF_ACTIVE); + eisa_io = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid, RF_ACTIVE); if (!eisa_io) { device_printf(dev, "No I/O space?!\n"); goto bad; @@ -144,8 +142,7 @@ vx_eisa_attach(device_t dev) sc->bsh = rman_get_bushandle(io); rid = 0; - irq = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, - 0, ~0, 1, RF_ACTIVE); + irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE); if (!irq) { device_printf(dev, "No irq?!\n"); goto bad; diff --git a/sys/dev/vx/if_vx_pci.c b/sys/dev/vx/if_vx_pci.c index ff4f1fb..42b9572 100644 --- a/sys/dev/vx/if_vx_pci.c +++ b/sys/dev/vx/if_vx_pci.c @@ -131,8 +131,7 @@ vx_pci_attach( sc = device_get_softc(dev); rid = PCIR_BAR(0); - sc->vx_res = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, - 0, ~0, 1, RF_ACTIVE); + sc->vx_res = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid, RF_ACTIVE); if (sc->vx_res == NULL) goto bad; @@ -141,7 +140,7 @@ vx_pci_attach( sc->bsh = rman_get_bushandle(sc->vx_res); rid = 0; - sc->vx_irq = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, 0, ~0, 1, + sc->vx_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_SHAREABLE | RF_ACTIVE); if (sc->vx_irq == NULL) -- cgit v1.1