irqchip/irq-pic32-evic: Fix bug with external interrupts.
authorJoshua Henderson <digitalpeer@digitalpeer.com>
Tue, 17 May 2016 05:05:53 +0000 (10:35 +0530)
committerMarc Zyngier <marc.zyngier@arm.com>
Thu, 2 Jun 2016 17:03:50 +0000 (18:03 +0100)
The wrong external interrupt bits are being set, offset by 1.

Signed-off-by: Joshua Henderson <digitalpeer@digitalpeer.com>
Signed-off-by: Purna Chandra Mandal <purna.mandal@microchip.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
drivers/irqchip/irq-pic32-evic.c

index e7155db01d55db0da6c69d25f2da068e48b1f798..73addb4b625b97fd2ce45b92d5fea6179f404bc7 100644 (file)
@@ -91,7 +91,7 @@ static int pic32_set_type_edge(struct irq_data *data,
        /* set polarity for external interrupts only */
        for (i = 0; i < ARRAY_SIZE(priv->ext_irqs); i++) {
                if (priv->ext_irqs[i] == data->hwirq) {
-                       ret = pic32_set_ext_polarity(i + 1, flow_type);
+                       ret = pic32_set_ext_polarity(i, flow_type);
                        if (ret)
                                return ret;
                }