From 43cd61606b6bfae52bb09856277751103bfa28fd Mon Sep 17 00:00:00 2001 From: Justin Hibbits Date: Fri, 19 Feb 2016 03:37:56 +0000 Subject: Replace several bus_alloc_resource() calls using default arguments with bus_alloc_resource_any() Since these calls only use default arguments, bus_alloc_resource_any() is the right call. Differential Revision: https://reviews.freebsd.org/D5306 --- sys/isa/isa_common.c | 8 ++++---- sys/isa/vga_isa.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'sys/isa') diff --git a/sys/isa/isa_common.c b/sys/isa/isa_common.c index 7c114594f56f..bb03ea0dd651 100644 --- a/sys/isa/isa_common.c +++ b/sys/isa/isa_common.c @@ -150,8 +150,8 @@ isa_find_memory(device_t child, struct isa_config *config, start += MAX(align, 1)) { bus_set_resource(child, SYS_RES_MEMORY, i, start, size); - res[i] = bus_alloc_resource(child, - SYS_RES_MEMORY, &i, 0, ~0, 1, + res[i] = bus_alloc_resource_any(child, + SYS_RES_MEMORY, &i, rman_make_alignment_flags(align) /* !RF_ACTIVE */); if (res[i]) { result->ic_mem[i].ir_start = start; @@ -224,8 +224,8 @@ isa_find_port(device_t child, struct isa_config *config, start += align) { bus_set_resource(child, SYS_RES_IOPORT, i, start, size); - res[i] = bus_alloc_resource(child, - SYS_RES_IOPORT, &i, 0, ~0, 1, + res[i] = bus_alloc_resource_any(child, + SYS_RES_IOPORT, &i, rman_make_alignment_flags(align) /* !RF_ACTIVE */); if (res[i]) { result->ic_port[i].ir_start = start; diff --git a/sys/isa/vga_isa.c b/sys/isa/vga_isa.c index bf7f9e009c41..455760d0f53b 100644 --- a/sys/isa/vga_isa.c +++ b/sys/isa/vga_isa.c @@ -195,11 +195,11 @@ isavga_attach(device_t dev) sc = device_get_softc(dev); rid = 0; - bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, - 0, ~0, 0, RF_ACTIVE | RF_SHAREABLE); + bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid, + RF_ACTIVE | RF_SHAREABLE); rid = 0; - bus_alloc_resource(dev, SYS_RES_MEMORY, &rid, - 0, ~0, 0, RF_ACTIVE | RF_SHAREABLE); + bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, + RF_ACTIVE | RF_SHAREABLE); error = vga_attach_unit(unit, sc, device_get_flags(dev)); if (error) -- cgit v1.3