mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
dmaengine: at_hdmac: 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> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
This commit is contained in:
parent
f083f55718
commit
dff232dab9
@ -473,15 +473,11 @@ atc_chain_complete(struct at_dma_chan *atchan, struct at_desc *desc)
|
|||||||
/* for cyclic transfers,
|
/* for cyclic transfers,
|
||||||
* no need to replay callback function while stopping */
|
* no need to replay callback function while stopping */
|
||||||
if (!atc_chan_is_cyclic(atchan)) {
|
if (!atc_chan_is_cyclic(atchan)) {
|
||||||
dma_async_tx_callback callback = txd->callback;
|
|
||||||
void *param = txd->callback_param;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The API requires that no submissions are done from a
|
* The API requires that no submissions are done from a
|
||||||
* callback, so we don't need to drop the lock here
|
* callback, so we don't need to drop the lock here
|
||||||
*/
|
*/
|
||||||
if (callback)
|
dmaengine_desc_get_callback_invoke(txd, NULL);
|
||||||
callback(param);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dma_run_dependencies(txd);
|
dma_run_dependencies(txd);
|
||||||
@ -598,15 +594,12 @@ static void atc_handle_cyclic(struct at_dma_chan *atchan)
|
|||||||
{
|
{
|
||||||
struct at_desc *first = atc_first_active(atchan);
|
struct at_desc *first = atc_first_active(atchan);
|
||||||
struct dma_async_tx_descriptor *txd = &first->txd;
|
struct dma_async_tx_descriptor *txd = &first->txd;
|
||||||
dma_async_tx_callback callback = txd->callback;
|
|
||||||
void *param = txd->callback_param;
|
|
||||||
|
|
||||||
dev_vdbg(chan2dev(&atchan->chan_common),
|
dev_vdbg(chan2dev(&atchan->chan_common),
|
||||||
"new cyclic period llp 0x%08x\n",
|
"new cyclic period llp 0x%08x\n",
|
||||||
channel_readl(atchan, DSCR));
|
channel_readl(atchan, DSCR));
|
||||||
|
|
||||||
if (callback)
|
dmaengine_desc_get_callback_invoke(txd, NULL);
|
||||||
callback(param);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*-- IRQ & Tasklet ---------------------------------------------------*/
|
/*-- IRQ & Tasklet ---------------------------------------------------*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user