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/cnw/if_cnw.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'sys/dev/cnw/if_cnw.c') diff --git a/sys/dev/cnw/if_cnw.c b/sys/dev/cnw/if_cnw.c index 801d715..b60cb74 100644 --- a/sys/dev/cnw/if_cnw.c +++ b/sys/dev/cnw/if_cnw.c @@ -1674,8 +1674,8 @@ static int cnw_alloc(dev) int error; rid = 0; - sc->mem_res = bus_alloc_resource(dev, SYS_RES_MEMORY, &rid, - 0, ~0, 1, RF_ACTIVE); + sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, + RF_ACTIVE); if (!sc->mem_res) { device_printf(dev, "Cannot allocate attribute memory\n"); return (ENOMEM); @@ -1701,8 +1701,7 @@ static int cnw_alloc(dev) } rid = 0; - sc->irq = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, - 0, ~0, 1, RF_ACTIVE); + sc->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE); if (!sc->irq) { device_printf(dev, "No irq?!\n"); return (ENXIO); -- cgit v1.1