parisc: convert the rest of the irq handlers to simple/percpu
[linux-2.6.git] / drivers / parisc / gsc.c
index 647adc9..772b193 100644 (file)
@@ -19,7 +19,6 @@
 #include <linux/interrupt.h>
 #include <linux/ioport.h>
 #include <linux/module.h>
-#include <linux/slab.h>
 #include <linux/types.h>
 
 #include <asm/hardware.h>
@@ -87,7 +86,7 @@ irqreturn_t gsc_asic_intr(int gsc_asic_irq, void *dev)
        do {
                int local_irq = __ffs(irr);
                unsigned int irq = gsc_asic->global_irq[local_irq];
-               __do_IRQ(irq);
+               generic_handle_irq(irq);
                irr &= ~(1 << local_irq);
        } while (irr);
 
@@ -106,10 +105,9 @@ int gsc_find_local_irq(unsigned int irq, int *global_irqs, int limit)
        return NO_IRQ;
 }
 
-static void gsc_asic_disable_irq(unsigned int irq)
+static void gsc_asic_mask_irq(unsigned int irq)
 {
-       struct irq_desc *desc = irq_to_desc(irq);
-       struct gsc_asic *irq_dev = desc->chip_data;
+       struct gsc_asic *irq_dev = get_irq_chip_data(irq);
        int local_irq = gsc_find_local_irq(irq, irq_dev->global_irq, 32);
        u32 imr;
 
@@ -122,10 +120,9 @@ static void gsc_asic_disable_irq(unsigned int irq)
        gsc_writel(imr, irq_dev->hpa + OFFSET_IMR);
 }
 
-static void gsc_asic_enable_irq(unsigned int irq)
+static void gsc_asic_unmask_irq(unsigned int irq)
 {
-       struct irq_desc *desc = irq_to_desc(irq);
-       struct gsc_asic *irq_dev = desc->chip_data;
+       struct gsc_asic *irq_dev = get_irq_chip_data(irq);
        int local_irq = gsc_find_local_irq(irq, irq_dev->global_irq, 32);
        u32 imr;
 
@@ -142,33 +139,22 @@ static void gsc_asic_enable_irq(unsigned int irq)
         */
 }
 
-static unsigned int gsc_asic_startup_irq(unsigned int irq)
-{
-       gsc_asic_enable_irq(irq);
-       return 0;
-}
-
 static struct irq_chip gsc_asic_interrupt_type = {
-       .typename =     "GSC-ASIC",
-       .startup =      gsc_asic_startup_irq,
-       .shutdown =     gsc_asic_disable_irq,
-       .enable =       gsc_asic_enable_irq,
-       .disable =      gsc_asic_disable_irq,
-       .ack =          no_ack_irq,
-       .end =          no_end_irq,
+       .name   =       "GSC-ASIC",
+       .unmask =       gsc_asic_unmask_irq,
+       .mask   =       gsc_asic_mask_irq,
 };
 
 int gsc_assign_irq(struct irq_chip *type, void *data)
 {
        static int irq = GSC_IRQ_BASE;
-       struct irq_desc *desc;
 
        if (irq > GSC_IRQ_MAX)
                return NO_IRQ;
 
-       desc = irq_to_desc(irq);
-       desc->chip = type;
-       desc->chip_data = data;
+       set_irq_chip_and_handler(irq, type, handle_simple_irq);
+       set_irq_chip_data(irq, data);
+
        return irq++;
 }