mfd: Fold irq_set_chip/irq_set_handler
authorThomas Gleixner <tglx@linutronix.de>
Fri, 25 Mar 2011 11:12:35 +0000 (11:12 +0000)
committerSamuel Ortiz <sameo@linux.intel.com>
Sat, 26 Mar 2011 23:09:52 +0000 (00:09 +0100)
Use the combined irq_set_chip_and_handler() function
instead. Converted with coccinelle.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/mfd/asic3.c
drivers/mfd/htc-egpio.c
drivers/mfd/htc-i2cpld.c
drivers/mfd/t7l66xb.c
drivers/mfd/tc6393xb.c

index 22b5a78bbfdb237604c4a42ac9449bf6dda64fdb..d4a851c6b5bf17f4da0b8326275a82c458c97983 100644 (file)
@@ -416,8 +416,7 @@ static void asic3_irq_remove(struct platform_device *pdev)
 
        for (irq = irq_base; irq < irq_base + ASIC3_NR_IRQS; irq++) {
                set_irq_flags(irq, 0);
-               irq_set_handler(irq, NULL);
-               irq_set_chip(irq, NULL);
+               irq_set_chip_and_handler(irq, NULL, NULL);
                irq_set_chip_data(irq, NULL);
        }
        irq_set_chained_handler(asic->irq_nr, NULL);
index fcd89e604ab19e63857e682e9600dc2c532ef4cb..bbaec0ccba8f1185dcb4dce0fd899c5b83ecef8a 100644 (file)
@@ -344,9 +344,9 @@ static int __init egpio_probe(struct platform_device *pdev)
                        ei->ack_write = 0;
                irq_end = ei->irq_start + ei->nirqs;
                for (irq = ei->irq_start; irq < irq_end; irq++) {
-                       irq_set_chip(irq, &egpio_muxed_chip);
+                       irq_set_chip_and_handler(irq, &egpio_muxed_chip,
+                                                handle_simple_irq);
                        irq_set_chip_data(irq, ei);
-                       irq_set_handler(irq, handle_simple_irq);
                        set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
                }
                irq_set_irq_type(ei->chained_irq, IRQ_TYPE_EDGE_RISING);
@@ -373,8 +373,7 @@ static int __exit egpio_remove(struct platform_device *pdev)
        if (ei->chained_irq) {
                irq_end = ei->irq_start + ei->nirqs;
                for (irq = ei->irq_start; irq < irq_end; irq++) {
-                       irq_set_chip(irq, NULL);
-                       irq_set_handler(irq, NULL);
+                       irq_set_chip_and_handler(irq, NULL, NULL);
                        set_irq_flags(irq, 0);
                }
                irq_set_chained_handler(ei->chained_irq, NULL);
index 9ba2a2a15dcb1a541abd61e9886005135f1dcc28..d55065cc324c7cfa9ae91911eff72a51beac2d0a 100644 (file)
@@ -348,9 +348,9 @@ static int __devinit htcpld_setup_chip_irq(
        /* Setup irq handlers */
        irq_end = chip->irq_start + chip->nirqs;
        for (irq = chip->irq_start; irq < irq_end; irq++) {
-               irq_set_chip(irq, &htcpld_muxed_chip);
+               irq_set_chip_and_handler(irq, &htcpld_muxed_chip,
+                                        handle_simple_irq);
                irq_set_chip_data(irq, chip);
-               irq_set_handler(irq, handle_simple_irq);
 #ifdef CONFIG_ARM
                set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
 #else
index 2e1fca4715ed77932a410c5d57387f823afc408f..42830e6929649ae99e729479eb76dd1dd4bd917c 100644 (file)
@@ -243,9 +243,8 @@ static void t7l66xb_attach_irq(struct platform_device *dev)
        irq_base = t7l66xb->irq_base;
 
        for (irq = irq_base; irq < irq_base + T7L66XB_NR_IRQS; irq++) {
-               irq_set_chip(irq, &t7l66xb_chip);
+               irq_set_chip_and_handler(irq, &t7l66xb_chip, handle_level_irq);
                irq_set_chip_data(irq, t7l66xb);
-               irq_set_handler(irq, handle_level_irq);
 #ifdef CONFIG_ARM
                set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
 #endif
index 06112c8628bf54fcac498d9d3f31fa942d974352..fc53ce287601b84062940d80428fdf3dcb358c16 100644 (file)
@@ -572,9 +572,8 @@ static void tc6393xb_attach_irq(struct platform_device *dev)
        irq_base = tc6393xb->irq_base;
 
        for (irq = irq_base; irq < irq_base + TC6393XB_NR_IRQS; irq++) {
-               irq_set_chip(irq, &tc6393xb_chip);
+               irq_set_chip_and_handler(irq, &tc6393xb_chip, handle_edge_irq);
                irq_set_chip_data(irq, tc6393xb);
-               irq_set_handler(irq, handle_edge_irq);
                set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
        }