提交 5c066f7d 编写于 作者: D Dave Jiang 提交者: Vinod Koul

dmaengine: pch_dma: 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>
上级 0024b2ac
...@@ -357,14 +357,13 @@ static void pdc_chain_complete(struct pch_dma_chan *pd_chan, ...@@ -357,14 +357,13 @@ static void pdc_chain_complete(struct pch_dma_chan *pd_chan,
struct pch_dma_desc *desc) struct pch_dma_desc *desc)
{ {
struct dma_async_tx_descriptor *txd = &desc->txd; struct dma_async_tx_descriptor *txd = &desc->txd;
dma_async_tx_callback callback = txd->callback; struct dmaengine_desc_callback cb;
void *param = txd->callback_param;
dmaengine_desc_get_callback(txd, &cb);
list_splice_init(&desc->tx_list, &pd_chan->free_list); list_splice_init(&desc->tx_list, &pd_chan->free_list);
list_move(&desc->desc_node, &pd_chan->free_list); list_move(&desc->desc_node, &pd_chan->free_list);
if (callback) dmaengine_desc_callback_invoke(&cb, NULL);
callback(param);
} }
static void pdc_complete_all(struct pch_dma_chan *pd_chan) static void pdc_complete_all(struct pch_dma_chan *pd_chan)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册