aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/dma/imx-dma.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/dma/imx-dma.c b/drivers/dma/imx-dma.c
index 6d29d7de4dcb..231d6e8e29f8 100644
--- a/drivers/dma/imx-dma.c
+++ b/drivers/dma/imx-dma.c
@@ -604,13 +604,11 @@ static void imxdma_tasklet(unsigned long data)
604 604
605 if (list_empty(&imxdmac->ld_active)) { 605 if (list_empty(&imxdmac->ld_active)) {
606 /* Someone might have called terminate all */ 606 /* Someone might have called terminate all */
607 goto out; 607 spin_unlock_irqrestore(&imxdma->lock, flags);
608 return;
608 } 609 }
609 desc = list_first_entry(&imxdmac->ld_active, struct imxdma_desc, node); 610 desc = list_first_entry(&imxdmac->ld_active, struct imxdma_desc, node);
610 611
611 if (desc->desc.callback)
612 desc->desc.callback(desc->desc.callback_param);
613
614 /* If we are dealing with a cyclic descriptor, keep it on ld_active 612 /* If we are dealing with a cyclic descriptor, keep it on ld_active
615 * and dont mark the descriptor as complete. 613 * and dont mark the descriptor as complete.
616 * Only in non-cyclic cases it would be marked as complete 614 * Only in non-cyclic cases it would be marked as complete
@@ -638,6 +636,10 @@ static void imxdma_tasklet(unsigned long data)
638 } 636 }
639out: 637out:
640 spin_unlock_irqrestore(&imxdma->lock, flags); 638 spin_unlock_irqrestore(&imxdma->lock, flags);
639
640 if (desc->desc.callback)
641 desc->desc.callback(desc->desc.callback_param);
642
641} 643}
642 644
643static int imxdma_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd, 645static int imxdma_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd,