diff options
Diffstat (limited to 'sys/dev/acpica')
-rw-r--r-- | sys/dev/acpica/Osd/OsdInterrupt.c | 4 | ||||
-rw-r--r-- | sys/dev/acpica/acpi.c | 2 | ||||
-rw-r--r-- | sys/dev/acpica/acpi_ec.c | 8 | ||||
-rw-r--r-- | sys/dev/acpica/acpi_resource.c | 7 | ||||
-rw-r--r-- | sys/dev/acpica/acpi_timer.c | 2 |
5 files changed, 11 insertions, 12 deletions
diff --git a/sys/dev/acpica/Osd/OsdInterrupt.c b/sys/dev/acpica/Osd/OsdInterrupt.c index e95ee80..42974cc 100644 --- a/sys/dev/acpica/Osd/OsdInterrupt.c +++ b/sys/dev/acpica/Osd/OsdInterrupt.c @@ -90,8 +90,8 @@ AcpiOsInstallInterruptHandler(UINT32 InterruptNumber, OSD_HANDLER ServiceRoutine InterruptNumber = InterruptOverride; } bus_set_resource(sc->acpi_dev, SYS_RES_IRQ, 0, InterruptNumber, 1); - if ((sc->acpi_irq = bus_alloc_resource(sc->acpi_dev, SYS_RES_IRQ, &sc->acpi_irq_rid, 0, ~0, 1, - RF_SHAREABLE | RF_ACTIVE)) == NULL) { + if ((sc->acpi_irq = bus_alloc_resource_any(sc->acpi_dev, SYS_RES_IRQ, + &sc->acpi_irq_rid, RF_SHAREABLE | RF_ACTIVE)) == NULL) { device_printf(sc->acpi_dev, "could not allocate SCI interrupt\n"); return_ACPI_STATUS(AE_ALREADY_EXISTS); } diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index 4b7a34e..187999a 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -882,7 +882,7 @@ acpi_bus_alloc_gas(device_t dev, int *rid, ACPI_GENERIC_ADDRESS *gas) } bus_set_resource(dev, type, *rid, gas->Address, gas->RegisterBitWidth / 8); - return (bus_alloc_resource(dev, type, rid, 0, ~0, 1, RF_ACTIVE)); + return (bus_alloc_resource_any(dev, type, rid, RF_ACTIVE)); } /* diff --git a/sys/dev/acpica/acpi_ec.c b/sys/dev/acpica/acpi_ec.c index 5eca9a8..4b2ac8a 100644 --- a/sys/dev/acpica/acpi_ec.c +++ b/sys/dev/acpica/acpi_ec.c @@ -530,8 +530,8 @@ acpi_ec_attach(device_t dev) /* Attach bus resources for data and command/status ports. */ sc->ec_data_rid = 0; - sc->ec_data_res = bus_alloc_resource(sc->ec_dev, SYS_RES_IOPORT, - &sc->ec_data_rid, 0, ~0, 1, RF_ACTIVE); + sc->ec_data_res = bus_alloc_resource_any(sc->ec_dev, SYS_RES_IOPORT, + &sc->ec_data_rid, RF_ACTIVE); if (sc->ec_data_res == NULL) { device_printf(dev, "can't allocate data port\n"); errval = ENXIO; @@ -541,8 +541,8 @@ acpi_ec_attach(device_t dev) sc->ec_data_handle = rman_get_bushandle(sc->ec_data_res); sc->ec_csr_rid = 1; - sc->ec_csr_res = bus_alloc_resource(sc->ec_dev, SYS_RES_IOPORT, - &sc->ec_csr_rid, 0, ~0, 1, RF_ACTIVE); + sc->ec_csr_res = bus_alloc_resource_any(sc->ec_dev, SYS_RES_IOPORT, + &sc->ec_csr_rid, RF_ACTIVE); if (sc->ec_csr_res == NULL) { device_printf(dev, "can't allocate command/status port\n"); errval = ENXIO; diff --git a/sys/dev/acpica/acpi_resource.c b/sys/dev/acpica/acpi_resource.c index 23ac064..e471f82 100644 --- a/sys/dev/acpica/acpi_resource.c +++ b/sys/dev/acpica/acpi_resource.c @@ -593,12 +593,11 @@ acpi_sysresource_attach(device_t dev) */ for (i = 0; i < 100; i++) { rid = i; - res = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, 0, ~0, 1, 0); + res = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid, 0); rid = i; - res = bus_alloc_resource(dev, SYS_RES_MEMORY, &rid, 0, ~0, 1, 0); + res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, 0); rid = i; - res = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, 0, ~0, 1, - RF_SHAREABLE); + res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_SHAREABLE); } return (0); diff --git a/sys/dev/acpica/acpi_timer.c b/sys/dev/acpica/acpi_timer.c index d9867c6..41e16b6 100644 --- a/sys/dev/acpica/acpi_timer.c +++ b/sys/dev/acpica/acpi_timer.c @@ -176,7 +176,7 @@ acpi_timer_identify(driver_t *driver, device_t parent) ? SYS_RES_IOPORT : SYS_RES_MEMORY; rstart = AcpiGbl_FADT->XPmTmrBlk.Address; bus_set_resource(dev, rtype, rid, rstart, rlen); - acpi_timer_reg = bus_alloc_resource(dev, rtype, &rid, 0, ~0, 1, RF_ACTIVE); + acpi_timer_reg = bus_alloc_resource_any(dev, rtype, &rid, RF_ACTIVE); if (acpi_timer_reg == NULL) { device_printf(dev, "couldn't allocate I/O resource (%s 0x%lx)\n", rtype == SYS_RES_IOPORT ? "port" : "mem", rstart); |