diff options
author | jhibbits <jhibbits@FreeBSD.org> | 2016-02-27 03:38:01 +0000 |
---|---|---|
committer | jhibbits <jhibbits@FreeBSD.org> | 2016-02-27 03:38:01 +0000 |
commit | 9da1c36d0a8d774c39703ec25190536771eaee70 (patch) | |
tree | bc27bca5a9b117f27964de1fbd3efe2e2ec151d3 /sys/dev/digi | |
parent | 8db64542512568b735293ebaad1c652c899a02f1 (diff) | |
download | FreeBSD-src-9da1c36d0a8d774c39703ec25190536771eaee70.zip FreeBSD-src-9da1c36d0a8d774c39703ec25190536771eaee70.tar.gz |
Migrate many bus_alloc_resource() calls to bus_alloc_resource_anywhere().
Most calls to bus_alloc_resource() use "anywhere" as the range, with a given
count. Migrate these to use the new bus_alloc_resource_anywhere() API.
Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D5370
Diffstat (limited to 'sys/dev/digi')
-rw-r--r-- | sys/dev/digi/digi_isa.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/dev/digi/digi_isa.c b/sys/dev/digi/digi_isa.c index d0741ac..647ea1d 100644 --- a/sys/dev/digi/digi_isa.c +++ b/sys/dev/digi/digi_isa.c @@ -277,8 +277,8 @@ digi_isa_probe(device_t dev) /* Temporarily map our io ports */ sc->res.iorid = 0; - sc->res.io = bus_alloc_resource(dev, SYS_RES_IOPORT, &sc->res.iorid, - 0ul, ~0ul, IO_SIZE, RF_ACTIVE); + sc->res.io = bus_alloc_resource_anywhere(dev, SYS_RES_IOPORT, + &sc->res.iorid, IO_SIZE, RF_ACTIVE); if (sc->res.io == NULL) return (ENXIO); @@ -291,8 +291,8 @@ digi_isa_probe(device_t dev) /* Temporarily map our memory */ sc->res.mrid = 0; - sc->res.mem = bus_alloc_resource(dev, SYS_RES_MEMORY, &sc->res.mrid, - 0ul, ~0ul, sc->win_size, 0); + sc->res.mem = bus_alloc_resource_anywhere(dev, SYS_RES_MEMORY, + &sc->res.mrid, sc->win_size, 0); if (sc->res.mem == NULL) { device_printf(dev, "0x%lx: Memory range is in use\n", sc->pmem); bus_release_resource(dev, SYS_RES_IOPORT, sc->res.iorid, @@ -342,8 +342,8 @@ digi_isa_attach(device_t dev) /* Allocate resources (verified in digi_isa_probe()) */ sc->res.iorid = 0; - sc->res.io = bus_alloc_resource(dev, SYS_RES_IOPORT, &sc->res.iorid, - 0ul, ~0ul, iosize, RF_ACTIVE); + sc->res.io = bus_alloc_resource_anywhere(dev, SYS_RES_IOPORT, + &sc->res.iorid, iosize, RF_ACTIVE); if (sc->res.io == NULL) return (ENXIO); @@ -356,8 +356,8 @@ digi_isa_attach(device_t dev) callout_handle_init(&sc->inttest); sc->res.mrid = 0; - sc->res.mem = bus_alloc_resource(dev, SYS_RES_MEMORY, &sc->res.mrid, - 0ul, ~0ul, msize, RF_ACTIVE); + sc->res.mem = bus_alloc_resource_anywhere(dev, SYS_RES_MEMORY, + &sc->res.mrid, msize, RF_ACTIVE); if (sc->res.mem == NULL) { device_printf(dev, "0x%lx: Memory range is in use\n", sc->pmem); sc->hidewin(sc); |