MIPS: Sibyte: Convert to new irq_chip functions
[sfrench/cifs-2.6.git] / arch / mips / sibyte / sb1250 / irq.c
index 12ac04a658ee55e6e29d329f6bce0f2e1b328854..fd269ea8d8a85cbe71ca3b1e0c31e40ecf80f2d3 100644 (file)
  * for interrupt lines
  */
 
-
-static void end_sb1250_irq(unsigned int irq);
-static void enable_sb1250_irq(unsigned int irq);
-static void disable_sb1250_irq(unsigned int irq);
-static void ack_sb1250_irq(unsigned int irq);
-#ifdef CONFIG_SMP
-static int sb1250_set_affinity(unsigned int irq, const struct cpumask *mask);
-#endif
-
 #ifdef CONFIG_SIBYTE_HAS_LDT
 extern unsigned long ldt_eoi_space;
 #endif
 
-static struct irq_chip sb1250_irq_type = {
-       .name = "SB1250-IMR",
-       .ack = ack_sb1250_irq,
-       .mask = disable_sb1250_irq,
-       .mask_ack = ack_sb1250_irq,
-       .unmask = enable_sb1250_irq,
-       .end = end_sb1250_irq,
-#ifdef CONFIG_SMP
-       .set_affinity = sb1250_set_affinity
-#endif
-};
-
 /* Store the CPU id (not the logical number) */
 int sb1250_irq_owner[SB1250_NR_IRQS];
 
@@ -102,9 +81,11 @@ void sb1250_unmask_irq(int cpu, int irq)
 }
 
 #ifdef CONFIG_SMP
-static int sb1250_set_affinity(unsigned int irq, const struct cpumask *mask)
+static int sb1250_set_affinity(struct irq_data *d, const struct cpumask *mask,
+                              bool force)
 {
        int i = 0, old_cpu, cpu, int_on;
+       unsigned int irq = d->irq;
        u64 cur_ints;
        unsigned long flags;
 
@@ -142,21 +123,17 @@ static int sb1250_set_affinity(unsigned int irq, const struct cpumask *mask)
 }
 #endif
 
-/*****************************************************************************/
-
-static void disable_sb1250_irq(unsigned int irq)
+static void enable_sb1250_irq(struct irq_data *d)
 {
-       sb1250_mask_irq(sb1250_irq_owner[irq], irq);
-}
+       unsigned int irq = d->irq;
 
-static void enable_sb1250_irq(unsigned int irq)
-{
        sb1250_unmask_irq(sb1250_irq_owner[irq], irq);
 }
 
 
-static void ack_sb1250_irq(unsigned int irq)
+static void ack_sb1250_irq(struct irq_data *d)
 {
+       unsigned int irq = d->irq;
 #ifdef CONFIG_SIBYTE_HAS_LDT
        u64 pending;
 
@@ -199,14 +176,14 @@ static void ack_sb1250_irq(unsigned int irq)
        sb1250_mask_irq(sb1250_irq_owner[irq], irq);
 }
 
-
-static void end_sb1250_irq(unsigned int irq)
-{
-       if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) {
-               sb1250_unmask_irq(sb1250_irq_owner[irq], irq);
-       }
-}
-
+static struct irq_chip sb1250_irq_type = {
+       .name = "SB1250-IMR",
+       .irq_mask_ack = ack_sb1250_irq,
+       .irq_unmask = enable_sb1250_irq,
+#ifdef CONFIG_SMP
+       .irq_set_affinity = sb1250_set_affinity
+#endif
+};
 
 void __init init_sb1250_irqs(void)
 {