summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuel Vadot <manu@FreeBSD.org>2020-09-30 17:09:17 +0000
committerEmmanuel Vadot <manu@FreeBSD.org>2020-09-30 17:09:17 +0000
commita52c8a65026df8910b0ad58c79ae8eb1eb166a8f (patch)
treea2a94b0f5f29bfddd2d5c2c47fe87558d046e665
parent4301a5a7941f736b30d3ebd79adf5499f203db0e (diff)
Notes
-rw-r--r--sys/dev/acpica/acpi_resource.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/sys/dev/acpica/acpi_resource.c b/sys/dev/acpica/acpi_resource.c
index 79ee745e9599c..fbd0baaa7d375 100644
--- a/sys/dev/acpica/acpi_resource.c
+++ b/sys/dev/acpica/acpi_resource.c
@@ -643,17 +643,13 @@ acpi_res_set_irq(device_t dev, void *context, uint8_t *irq, int count,
int trig, int pol)
{
struct acpi_res_context *cp = (struct acpi_res_context *)context;
- rman_res_t intr;
+ int i;
if (cp == NULL || irq == NULL)
return;
- /* This implements no resource relocation. */
- if (count != 1)
- return;
-
- intr = *irq;
- bus_set_resource(dev, SYS_RES_IRQ, cp->ar_nirq++, intr, 1);
+ for (i = 0; i < count; i++)
+ bus_set_resource(dev, SYS_RES_IRQ, cp->ar_nirq++, irq[i], 1);
}
static void
@@ -661,17 +657,13 @@ acpi_res_set_ext_irq(device_t dev, void *context, uint32_t *irq, int count,
int trig, int pol)
{
struct acpi_res_context *cp = (struct acpi_res_context *)context;
- rman_res_t intr;
+ int i;
if (cp == NULL || irq == NULL)
return;
- /* This implements no resource relocation. */
- if (count != 1)
- return;
-
- intr = *irq;
- bus_set_resource(dev, SYS_RES_IRQ, cp->ar_nirq++, intr, 1);
+ for (i = 0; i < count; i++)
+ bus_set_resource(dev, SYS_RES_IRQ, cp->ar_nirq++, irq[i], 1);
}
static void