mirror of
https://github.com/torvalds/linux.git
synced 2024-11-28 15:11:31 +00:00
dmaengine: ep93xx_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: Dave Jiang <dave.jiang@intel.com> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
This commit is contained in:
parent
577ef92512
commit
dac86a148a
@ -739,10 +739,10 @@ static void ep93xx_dma_tasklet(unsigned long data)
|
|||||||
{
|
{
|
||||||
struct ep93xx_dma_chan *edmac = (struct ep93xx_dma_chan *)data;
|
struct ep93xx_dma_chan *edmac = (struct ep93xx_dma_chan *)data;
|
||||||
struct ep93xx_dma_desc *desc, *d;
|
struct ep93xx_dma_desc *desc, *d;
|
||||||
dma_async_tx_callback callback = NULL;
|
struct dmaengine_desc_callback cb;
|
||||||
void *callback_param = NULL;
|
|
||||||
LIST_HEAD(list);
|
LIST_HEAD(list);
|
||||||
|
|
||||||
|
memset(&cb, 0, sizeof(cb));
|
||||||
spin_lock_irq(&edmac->lock);
|
spin_lock_irq(&edmac->lock);
|
||||||
/*
|
/*
|
||||||
* If dma_terminate_all() was called before we get to run, the active
|
* If dma_terminate_all() was called before we get to run, the active
|
||||||
@ -757,8 +757,7 @@ static void ep93xx_dma_tasklet(unsigned long data)
|
|||||||
dma_cookie_complete(&desc->txd);
|
dma_cookie_complete(&desc->txd);
|
||||||
list_splice_init(&edmac->active, &list);
|
list_splice_init(&edmac->active, &list);
|
||||||
}
|
}
|
||||||
callback = desc->txd.callback;
|
dmaengine_desc_get_callback(&desc->txd, &cb);
|
||||||
callback_param = desc->txd.callback_param;
|
|
||||||
}
|
}
|
||||||
spin_unlock_irq(&edmac->lock);
|
spin_unlock_irq(&edmac->lock);
|
||||||
|
|
||||||
@ -771,8 +770,7 @@ static void ep93xx_dma_tasklet(unsigned long data)
|
|||||||
ep93xx_dma_desc_put(edmac, desc);
|
ep93xx_dma_desc_put(edmac, desc);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (callback)
|
dmaengine_desc_callback_invoke(&cb, NULL);
|
||||||
callback(callback_param);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static irqreturn_t ep93xx_dma_interrupt(int irq, void *dev_id)
|
static irqreturn_t ep93xx_dma_interrupt(int irq, void *dev_id)
|
||||||
|
Loading…
Reference in New Issue
Block a user