aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/hpet.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/hpet.c')
-rw-r--r--drivers/char/hpet.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c
index 66a2fee06eb9..ef140ebde117 100644
--- a/drivers/char/hpet.c
+++ b/drivers/char/hpet.c
@@ -956,22 +956,18 @@ static acpi_status hpet_resources(struct acpi_resource *res, void *data)
956 } 956 }
957 } else if (res->type == ACPI_RESOURCE_TYPE_EXTENDED_IRQ) { 957 } else if (res->type == ACPI_RESOURCE_TYPE_EXTENDED_IRQ) {
958 struct acpi_resource_extended_irq *irqp; 958 struct acpi_resource_extended_irq *irqp;
959 int i; 959 int i, irq;
960 960
961 irqp = &res->data.extended_irq; 961 irqp = &res->data.extended_irq;
962 962
963 if (irqp->interrupt_count > 0) { 963 for (i = 0; i < irqp->interrupt_count; i++) {
964 hdp->hd_nirqs = irqp->interrupt_count; 964 irq = acpi_register_gsi(irqp->interrupts[i],
965 965 irqp->triggering, irqp->polarity);
966 for (i = 0; i < hdp->hd_nirqs; i++) { 966 if (irq < 0)
967 int rc = 967 return AE_ERROR;
968 acpi_register_gsi(irqp->interrupts[i], 968
969 irqp->triggering, 969 hdp->hd_irq[hdp->hd_nirqs] = irq;
970 irqp->polarity); 970 hdp->hd_nirqs++;
971 if (rc < 0)
972 return AE_ERROR;
973 hdp->hd_irq[i] = rc;
974 }
975 } 971 }
976 } 972 }
977 973