ARM: common: edma: Fix channel parameter for irq callbacks
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Wed, 14 Oct 2015 11:42:43 +0000 (14:42 +0300)
committerVinod Koul <vinod.koul@intel.com>
Wed, 14 Oct 2015 14:25:34 +0000 (19:55 +0530)
In case when the interrupt happened for the second eDMA the channel
number was incorrectly passed to the client driver.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
CC: <stable@vger.kernel.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
arch/arm/common/edma.c

index 873dbfcc7dc9db9278e0727a20c30f53df4db1bf..56fc339571f92e5d372b786d181cb5dc5f361b12 100644 (file)
@@ -406,7 +406,8 @@ static irqreturn_t dma_irq_handler(int irq, void *data)
                                        BIT(slot));
                        if (edma_cc[ctlr]->intr_data[channel].callback)
                                edma_cc[ctlr]->intr_data[channel].callback(
-                                       channel, EDMA_DMA_COMPLETE,
+                                       EDMA_CTLR_CHAN(ctlr, channel),
+                                       EDMA_DMA_COMPLETE,
                                        edma_cc[ctlr]->intr_data[channel].data);
                }
        } while (sh_ipr);
@@ -460,7 +461,8 @@ static irqreturn_t dma_ccerr_handler(int irq, void *data)
                                        if (edma_cc[ctlr]->intr_data[k].
                                                                callback) {
                                                edma_cc[ctlr]->intr_data[k].
-                                               callback(k,
+                                               callback(
+                                               EDMA_CTLR_CHAN(ctlr, k),
                                                EDMA_DMA_CC_ERROR,
                                                edma_cc[ctlr]->intr_data
                                                [k].data);