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/ichsmb | |
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/ichsmb')
-rw-r--r-- | sys/dev/ichsmb/ichsmb_pci.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/ichsmb/ichsmb_pci.c b/sys/dev/ichsmb/ichsmb_pci.c index fc8024a..8f3f106 100644 --- a/sys/dev/ichsmb/ichsmb_pci.c +++ b/sys/dev/ichsmb/ichsmb_pci.c @@ -241,11 +241,11 @@ ichsmb_pci_attach(device_t dev) /* Allocate an I/O range */ sc->io_rid = ICH_SMB_BASE; - sc->io_res = bus_alloc_resource(dev, SYS_RES_IOPORT, - &sc->io_rid, 0, ~0, 16, RF_ACTIVE); + sc->io_res = bus_alloc_resource_anywhere(dev, SYS_RES_IOPORT, + &sc->io_rid, 16, RF_ACTIVE); if (sc->io_res == NULL) - sc->io_res = bus_alloc_resource(dev, SYS_RES_IOPORT, - &sc->io_rid, 0ul, ~0ul, 32, RF_ACTIVE); + sc->io_res = bus_alloc_resource_anywhere(dev, SYS_RES_IOPORT, + &sc->io_rid, 32, RF_ACTIVE); if (sc->io_res == NULL) { device_printf(dev, "can't map I/O\n"); error = ENXIO; |