dmaengine: ipu: Consolidate chained IRQ handler install/remove
authorThomas Gleixner <tglx@linutronix.de>
Mon, 13 Jul 2015 20:39:52 +0000 (20:39 +0000)
committerVinod Koul <vinod.koul@intel.com>
Thu, 16 Jul 2015 13:10:52 +0000 (18:40 +0530)
Chained irq handlers usually set up handler data as well. We now have
a function to set both under irq_desc->lock. Replace the two calls
with one.

Search and conversion was done with coccinelle.

Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Julia Lawall <Julia.Lawall@lip6.fr>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Vinod Koul <vinod.koul@intel.com>
Cc: dmaengine@vger.kernel.org
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/ipu/ipu_irq.c

index 2e284a4438bcac3161fd3107931dc72156ff9601..8d36f07b580177f32cd852357bfe9c63a1356184 100644 (file)
@@ -382,11 +382,9 @@ int __init ipu_irq_attach_irq(struct ipu *ipu, struct platform_device *dev)
 #endif
        }
 
-       irq_set_handler_data(ipu->irq_fn, ipu);
-       irq_set_chained_handler(ipu->irq_fn, ipu_irq_fn);
+       irq_set_chained_handler_and_data(ipu->irq_fn, ipu_irq_fn, ipu);
 
-       irq_set_handler_data(ipu->irq_err, ipu);
-       irq_set_chained_handler(ipu->irq_err, ipu_irq_err);
+       irq_set_chained_handler_and_data(ipu->irq_err, ipu_irq_err, ipu);
 
        ipu->irq_base = irq_base;
 
@@ -399,11 +397,9 @@ void ipu_irq_detach_irq(struct ipu *ipu, struct platform_device *dev)
 
        irq_base = ipu->irq_base;
 
-       irq_set_chained_handler(ipu->irq_fn, NULL);
-       irq_set_handler_data(ipu->irq_fn, NULL);
+       irq_set_chained_handler_and_data(ipu->irq_fn, NULL, NULL);
 
-       irq_set_chained_handler(ipu->irq_err, NULL);
-       irq_set_handler_data(ipu->irq_err, NULL);
+       irq_set_chained_handler_and_data(ipu->irq_err, NULL, NULL);
 
        for (irq = irq_base; irq < irq_base + CONFIG_MX3_IPU_IRQS; irq++) {
 #ifdef CONFIG_ARM