MIPS: ath79: Convert to new irq_chip functions
authorThomas Gleixner <tglx@linutronix.de>
Wed, 23 Mar 2011 21:08:47 +0000 (21:08 +0000)
committerRalf Baechle <ralf@linux-mips.org>
Fri, 25 Mar 2011 17:45:15 +0000 (18:45 +0100)
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
To: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/2175/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/ath79/irq.c

index 040762abdcd1ee24a4fcf32a107a4c0e84bdd1c3..7c02bc948a313077aac8fd354a0b2302c8f57169 100644 (file)
@@ -62,13 +62,12 @@ static void ath79_misc_irq_handler(unsigned int irq, struct irq_desc *desc)
                spurious_interrupt();
 }
 
-static void ar71xx_misc_irq_unmask(unsigned int irq)
+static void ar71xx_misc_irq_unmask(struct irq_data *d)
 {
+       unsigned int irq = d->irq - ATH79_MISC_IRQ_BASE;
        void __iomem *base = ath79_reset_base;
        u32 t;
 
-       irq -= ATH79_MISC_IRQ_BASE;
-
        t = __raw_readl(base + AR71XX_RESET_REG_MISC_INT_ENABLE);
        __raw_writel(t | (1 << irq), base + AR71XX_RESET_REG_MISC_INT_ENABLE);
 
@@ -76,13 +75,12 @@ static void ar71xx_misc_irq_unmask(unsigned int irq)
        __raw_readl(base + AR71XX_RESET_REG_MISC_INT_ENABLE);
 }
 
-static void ar71xx_misc_irq_mask(unsigned int irq)
+static void ar71xx_misc_irq_mask(struct irq_data *d)
 {
+       unsigned int irq = d->irq - ATH79_MISC_IRQ_BASE;
        void __iomem *base = ath79_reset_base;
        u32 t;
 
-       irq -= ATH79_MISC_IRQ_BASE;
-
        t = __raw_readl(base + AR71XX_RESET_REG_MISC_INT_ENABLE);
        __raw_writel(t & ~(1 << irq), base + AR71XX_RESET_REG_MISC_INT_ENABLE);
 
@@ -90,13 +88,12 @@ static void ar71xx_misc_irq_mask(unsigned int irq)
        __raw_readl(base + AR71XX_RESET_REG_MISC_INT_ENABLE);
 }
 
-static void ar724x_misc_irq_ack(unsigned int irq)
+static void ar724x_misc_irq_ack(struct irq_data *d)
 {
+       unsigned int irq = d->irq - ATH79_MISC_IRQ_BASE;
        void __iomem *base = ath79_reset_base;
        u32 t;
 
-       irq -= ATH79_MISC_IRQ_BASE;
-
        t = __raw_readl(base + AR71XX_RESET_REG_MISC_INT_STATUS);
        __raw_writel(t & ~(1 << irq), base + AR71XX_RESET_REG_MISC_INT_STATUS);
 
@@ -106,8 +103,8 @@ static void ar724x_misc_irq_ack(unsigned int irq)
 
 static struct irq_chip ath79_misc_irq_chip = {
        .name           = "MISC",
-       .unmask         = ar71xx_misc_irq_unmask,
-       .mask           = ar71xx_misc_irq_mask,
+       .irq_unmask     = ar71xx_misc_irq_unmask,
+       .irq_mask       = ar71xx_misc_irq_mask,
 };
 
 static void __init ath79_misc_irq_init(void)
@@ -119,9 +116,9 @@ static void __init ath79_misc_irq_init(void)
        __raw_writel(0, base + AR71XX_RESET_REG_MISC_INT_STATUS);
 
        if (soc_is_ar71xx() || soc_is_ar913x())
-               ath79_misc_irq_chip.mask_ack = ar71xx_misc_irq_mask;
+               ath79_misc_irq_chip.irq_mask_ack = ar71xx_misc_irq_mask;
        else if (soc_is_ar724x())
-               ath79_misc_irq_chip.ack = ar724x_misc_irq_ack;
+               ath79_misc_irq_chip.irq_ack = ar724x_misc_irq_ack;
        else
                BUG();