aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVinod Koul <vinod.koul@intel.com>2016-08-04 08:36:13 -0400
committerVinod Koul <vinod.koul@intel.com>2016-08-07 22:41:43 -0400
commit369dbadac151232960fceb83cb14473e8a4e1a36 (patch)
tree8e09fdd81853a995824f1d5c972db3f377196343
parent9686218982709122373b755c9d7457bed0872999 (diff)
dmengine: xilinx_dma: convert callback to helper function
Move the xilinx driver to new dmaengine callback Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-rw-r--r--drivers/dma/xilinx/xilinx_dma.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c
index 4e223d094433..8288fe4d17c3 100644
--- a/drivers/dma/xilinx/xilinx_dma.c
+++ b/drivers/dma/xilinx/xilinx_dma.c
@@ -755,8 +755,7 @@ static void xilinx_dma_chan_desc_cleanup(struct xilinx_dma_chan *chan)
755 spin_lock_irqsave(&chan->lock, flags); 755 spin_lock_irqsave(&chan->lock, flags);
756 756
757 list_for_each_entry_safe(desc, next, &chan->done_list, node) { 757 list_for_each_entry_safe(desc, next, &chan->done_list, node) {
758 dma_async_tx_callback callback; 758 struct dmaengine_desc_callback cb;
759 void *callback_param;
760 759
761 if (desc->cyclic) { 760 if (desc->cyclic) {
762 xilinx_dma_chan_handle_cyclic(chan, desc, &flags); 761 xilinx_dma_chan_handle_cyclic(chan, desc, &flags);
@@ -767,11 +766,10 @@ static void xilinx_dma_chan_desc_cleanup(struct xilinx_dma_chan *chan)
767 list_del(&desc->node); 766 list_del(&desc->node);
768 767
769 /* Run the link descriptor callback function */ 768 /* Run the link descriptor callback function */
770 callback = desc->async_tx.callback; 769 dmaengine_desc_get_callback(&desc->async_tx, &cb);
771 callback_param = desc->async_tx.callback_param; 770 if (dmaengine_desc_callback_valid(&cb)) {
772 if (callback) {
773 spin_unlock_irqrestore(&chan->lock, flags); 771 spin_unlock_irqrestore(&chan->lock, flags);
774 callback(callback_param); 772 dmaengine_desc_callback_invoke(&cb, NULL);
775 spin_lock_irqsave(&chan->lock, flags); 773 spin_lock_irqsave(&chan->lock, flags);
776 } 774 }
777 775