sh: mach-microdev: irq_data conversion.
authorPaul Mundt <lethal@linux-sh.org>
Wed, 27 Oct 2010 05:54:10 +0000 (14:54 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Wed, 27 Oct 2010 05:54:10 +0000 (14:54 +0900)
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/boards/mach-microdev/irq.c

index a26d16669aa2e377928cc606eaf144205ac150a1..c35001fd90329caf7fca0f88531ddfc858fb03f0 100644 (file)
@@ -65,19 +65,9 @@ static const struct {
 #  error Inconsistancy in defining the IRQ# for primary IDE!
 #endif
 
-static void enable_microdev_irq(unsigned int irq);
-static void disable_microdev_irq(unsigned int irq);
-static void mask_and_ack_microdev(unsigned int);
-
-static struct irq_chip microdev_irq_type = {
-       .name = "MicroDev-IRQ",
-       .unmask = enable_microdev_irq,
-       .mask = disable_microdev_irq,
-       .ack = mask_and_ack_microdev,
-};
-
-static void disable_microdev_irq(unsigned int irq)
+static void disable_microdev_irq(struct irq_data *data)
 {
+       unsigned int irq = data->irq;
        unsigned int fpgaIrq;
 
        if (irq >= NUM_EXTERNAL_IRQS)
@@ -91,8 +81,9 @@ static void disable_microdev_irq(unsigned int irq)
        __raw_writel(MICRODEV_FPGA_INTC_MASK(fpgaIrq), MICRODEV_FPGA_INTDSB_REG);
 }
 
-static void enable_microdev_irq(unsigned int irq)
+static void enable_microdev_irq(struct irq_data *data)
 {
+       unsigned int irq = data->irq;
        unsigned long priorityReg, priorities, pri;
        unsigned int fpgaIrq;
 
@@ -116,17 +107,18 @@ static void enable_microdev_irq(unsigned int irq)
        __raw_writel(MICRODEV_FPGA_INTC_MASK(fpgaIrq), MICRODEV_FPGA_INTENB_REG);
 }
 
+static struct irq_chip microdev_irq_type = {
+       .name = "MicroDev-IRQ",
+       .irq_unmask = enable_microdev_irq,
+       .irq_mask = disable_microdev_irq,
+};
+
 /* This function sets the desired irq handler to be a MicroDev type */
 static void __init make_microdev_irq(unsigned int irq)
 {
        disable_irq_nosync(irq);
        set_irq_chip_and_handler(irq, &microdev_irq_type, handle_level_irq);
-       disable_microdev_irq(irq);
-}
-
-static void mask_and_ack_microdev(unsigned int irq)
-{
-       disable_microdev_irq(irq);
+       disable_microdev_irq(irq_get_irq_data(irq));
 }
 
 extern void __init init_microdev_irq(void)