aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Jiang <dave.jiang@intel.com>2016-07-20 16:12:24 -0400
committerVinod Koul <vinod.koul@intel.com>2016-08-07 22:41:40 -0400
commit0024b2ac374490de46bfd35c43002c7800ad14ed (patch)
treee9a2ddca5e538bc1a8150aea17767c261025db6d
parent064370c6a1d97dda4b8827c02782587023c5c227 (diff)
dmaengine: nbpfaxi: convert callback to helper function
This is in preperation of moving to a callback that provides results to the callback for the transaction. The conversion will maintain current behavior and the driver must convert to new callback mechanism at a later time in order to receive results. Signed-off-by: Dave Jiang <dave.jiang@intel.com> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-rw-r--r--drivers/dma/nbpfaxi.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/dma/nbpfaxi.c b/drivers/dma/nbpfaxi.c
index 08c45c185549..09de71519d37 100644
--- a/drivers/dma/nbpfaxi.c
+++ b/drivers/dma/nbpfaxi.c
@@ -1102,8 +1102,7 @@ static void nbpf_chan_tasklet(unsigned long data)
1102{ 1102{
1103 struct nbpf_channel *chan = (struct nbpf_channel *)data; 1103 struct nbpf_channel *chan = (struct nbpf_channel *)data;
1104 struct nbpf_desc *desc, *tmp; 1104 struct nbpf_desc *desc, *tmp;
1105 dma_async_tx_callback callback; 1105 struct dmaengine_desc_callback cb;
1106 void *param;
1107 1106
1108 while (!list_empty(&chan->done)) { 1107 while (!list_empty(&chan->done)) {
1109 bool found = false, must_put, recycling = false; 1108 bool found = false, must_put, recycling = false;
@@ -1151,14 +1150,12 @@ static void nbpf_chan_tasklet(unsigned long data)
1151 must_put = false; 1150 must_put = false;
1152 } 1151 }
1153 1152
1154 callback = desc->async_tx.callback; 1153 dmaengine_desc_get_callback(&desc->async_tx, &cb);
1155 param = desc->async_tx.callback_param;
1156 1154
1157 /* ack and callback completed descriptor */ 1155 /* ack and callback completed descriptor */
1158 spin_unlock_irq(&chan->lock); 1156 spin_unlock_irq(&chan->lock);
1159 1157
1160 if (callback) 1158 dmaengine_desc_callback_invoke(&cb, NULL);
1161 callback(param);
1162 1159
1163 if (must_put) 1160 if (must_put)
1164 nbpf_desc_put(desc); 1161 nbpf_desc_put(desc);