diff options
Diffstat (limited to 'sys/dev/buslogic')
-rw-r--r-- | sys/dev/buslogic/bt_eisa.c | 7 | ||||
-rw-r--r-- | sys/dev/buslogic/bt_isa.c | 6 | ||||
-rw-r--r-- | sys/dev/buslogic/bt_mca.c | 9 | ||||
-rw-r--r-- | sys/dev/buslogic/bt_pci.c | 10 |
4 files changed, 12 insertions, 20 deletions
diff --git a/sys/dev/buslogic/bt_eisa.c b/sys/dev/buslogic/bt_eisa.c index eb28e75..3157503 100644 --- a/sys/dev/buslogic/bt_eisa.c +++ b/sys/dev/buslogic/bt_eisa.c @@ -123,8 +123,7 @@ bt_eisa_alloc_resources(device_t dev) * order. */ rid = 0; - port = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, - 0, ~0, 1, RF_ACTIVE); + port = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid, RF_ACTIVE); if (!port) return (ENOMEM); @@ -133,8 +132,8 @@ bt_eisa_alloc_resources(device_t dev) if (eisa_get_irq(dev) != -1) { shared = bt->level_trigger_ints ? RF_SHAREABLE : 0; rid = 0; - irq = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, - 0, ~0, 1, shared | RF_ACTIVE); + irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, + shared | RF_ACTIVE); if (!irq) { if (port) bus_release_resource(dev, SYS_RES_IOPORT, diff --git a/sys/dev/buslogic/bt_isa.c b/sys/dev/buslogic/bt_isa.c index 24c7d7b..3241abd 100644 --- a/sys/dev/buslogic/bt_isa.c +++ b/sys/dev/buslogic/bt_isa.c @@ -68,8 +68,7 @@ bt_isa_alloc_resources(device_t dev, u_long portstart, u_long portend) if (isa_get_irq(dev) != -1) { 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) { if (port) bus_release_resource(dev, SYS_RES_IOPORT, @@ -81,8 +80,7 @@ bt_isa_alloc_resources(device_t dev, u_long portstart, u_long portend) if (isa_get_drq(dev) != -1) { rid = 0; - drq = bus_alloc_resource(dev, SYS_RES_DRQ, &rid, - 0, ~0, 1, RF_ACTIVE); + drq = bus_alloc_resource_any(dev, SYS_RES_DRQ, &rid, RF_ACTIVE); if (!drq) { if (port) bus_release_resource(dev, SYS_RES_IOPORT, diff --git a/sys/dev/buslogic/bt_mca.c b/sys/dev/buslogic/bt_mca.c index 1b9a2f3..1bdfbe8 100644 --- a/sys/dev/buslogic/bt_mca.c +++ b/sys/dev/buslogic/bt_mca.c @@ -122,8 +122,7 @@ bt_mca_alloc_resources(device_t dev, int mode) int rid; 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 == NULL) { printf("bt_mca_alloc_resources() failed to allocate IOPORT\n"); return (ENOMEM); @@ -132,16 +131,14 @@ bt_mca_alloc_resources(device_t dev, int mode) if (mode == BT_MCA_ATTACH) { 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 == NULL) { printf("bt_mca_alloc_resources() failed to allocate IRQ\n"); goto bad; } rid = 0; - drq = bus_alloc_resource(dev, SYS_RES_DRQ, &rid, - 0, ~0, 1, RF_ACTIVE); + drq = bus_alloc_resource_any(dev, SYS_RES_DRQ, &rid, RF_ACTIVE); if (drq == NULL) { printf("bt_mca_alloc_resources() failed to allocate DRQ\n"); goto bad; diff --git a/sys/dev/buslogic/bt_pci.c b/sys/dev/buslogic/bt_pci.c index 5ebfe9a..121bb25 100644 --- a/sys/dev/buslogic/bt_pci.c +++ b/sys/dev/buslogic/bt_pci.c @@ -68,23 +68,21 @@ bt_pci_alloc_resources(device_t dev) if (command & PCIM_CMD_MEMEN) { type = SYS_RES_MEMORY; rid = BT_PCI_MEMADDR; - regs = bus_alloc_resource(dev, type, &rid, - 0, ~0, 1, RF_ACTIVE); + regs = bus_alloc_resource_any(dev, type, &rid, RF_ACTIVE); } #else if (!regs && (command & PCIM_CMD_PORTEN)) { type = SYS_RES_IOPORT; rid = BT_PCI_IOADDR; - regs = bus_alloc_resource(dev, type, &rid, - 0, ~0, 1, RF_ACTIVE); + regs = bus_alloc_resource_any(dev, type, &rid, RF_ACTIVE); } #endif if (!regs) return (ENOMEM); zero = 0; - irq = bus_alloc_resource(dev, SYS_RES_IRQ, &zero, - 0, ~0, 1, RF_ACTIVE | RF_SHAREABLE); + irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &zero, + RF_ACTIVE | RF_SHAREABLE); if (!irq) { bus_release_resource(dev, type, rid, regs); return (ENOMEM); |