提交 0024b2ac 编写于 作者: D Dave Jiang 提交者: Vinod Koul

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: NDave Jiang <dave.jiang@intel.com>
Reviewed-by: NLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: NVinod Koul <vinod.koul@intel.com>
上级 064370c6
...@@ -1102,8 +1102,7 @@ static void nbpf_chan_tasklet(unsigned long data) ...@@ -1102,8 +1102,7 @@ static void nbpf_chan_tasklet(unsigned long data)
{ {
struct nbpf_channel *chan = (struct nbpf_channel *)data; struct nbpf_channel *chan = (struct nbpf_channel *)data;
struct nbpf_desc *desc, *tmp; struct nbpf_desc *desc, *tmp;
dma_async_tx_callback callback; struct dmaengine_desc_callback cb;
void *param;
while (!list_empty(&chan->done)) { while (!list_empty(&chan->done)) {
bool found = false, must_put, recycling = false; bool found = false, must_put, recycling = false;
...@@ -1151,14 +1150,12 @@ static void nbpf_chan_tasklet(unsigned long data) ...@@ -1151,14 +1150,12 @@ static void nbpf_chan_tasklet(unsigned long data)
must_put = false; must_put = false;
} }
callback = desc->async_tx.callback; dmaengine_desc_get_callback(&desc->async_tx, &cb);
param = desc->async_tx.callback_param;
/* ack and callback completed descriptor */ /* ack and callback completed descriptor */
spin_unlock_irq(&chan->lock); spin_unlock_irq(&chan->lock);
if (callback) dmaengine_desc_callback_invoke(&cb, NULL);
callback(param);
if (must_put) if (must_put)
nbpf_desc_put(desc); nbpf_desc_put(desc);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册