diff options
author | Dave Jiang <dave.jiang@intel.com> | 2016-07-20 16:11:05 -0400 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2016-08-07 22:41:38 -0400 |
commit | dac86a148a8f363993dfe62931e0fb08d6108136 (patch) | |
tree | 761f2a0e4a6793d6ff47a4c53508948dac42c09d /drivers/dma/ep93xx_dma.c | |
parent | 577ef92512a5baf90233ab5d0dd6dd7dca33ee96 (diff) |
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>
Diffstat (limited to 'drivers/dma/ep93xx_dma.c')
-rw-r--r-- | drivers/dma/ep93xx_dma.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/dma/ep93xx_dma.c b/drivers/dma/ep93xx_dma.c index 21f08cc3352b..aba0b381cb8c 100644 --- a/drivers/dma/ep93xx_dma.c +++ b/drivers/dma/ep93xx_dma.c | |||
@@ -739,10 +739,10 @@ static void ep93xx_dma_tasklet(unsigned long data) | |||
739 | { | 739 | { |
740 | struct ep93xx_dma_chan *edmac = (struct ep93xx_dma_chan *)data; | 740 | struct ep93xx_dma_chan *edmac = (struct ep93xx_dma_chan *)data; |
741 | struct ep93xx_dma_desc *desc, *d; | 741 | struct ep93xx_dma_desc *desc, *d; |
742 | dma_async_tx_callback callback = NULL; | 742 | struct dmaengine_desc_callback cb; |
743 | void *callback_param = NULL; | ||
744 | LIST_HEAD(list); | 743 | LIST_HEAD(list); |
745 | 744 | ||
745 | memset(&cb, 0, sizeof(cb)); | ||
746 | spin_lock_irq(&edmac->lock); | 746 | spin_lock_irq(&edmac->lock); |
747 | /* | 747 | /* |
748 | * If dma_terminate_all() was called before we get to run, the active | 748 | * 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) | |||
757 | dma_cookie_complete(&desc->txd); | 757 | dma_cookie_complete(&desc->txd); |
758 | list_splice_init(&edmac->active, &list); | 758 | list_splice_init(&edmac->active, &list); |
759 | } | 759 | } |
760 | callback = desc->txd.callback; | 760 | dmaengine_desc_get_callback(&desc->txd, &cb); |
761 | callback_param = desc->txd.callback_param; | ||
762 | } | 761 | } |
763 | spin_unlock_irq(&edmac->lock); | 762 | spin_unlock_irq(&edmac->lock); |
764 | 763 | ||
@@ -771,8 +770,7 @@ static void ep93xx_dma_tasklet(unsigned long data) | |||
771 | ep93xx_dma_desc_put(edmac, desc); | 770 | ep93xx_dma_desc_put(edmac, desc); |
772 | } | 771 | } |
773 | 772 | ||
774 | if (callback) | 773 | dmaengine_desc_callback_invoke(&cb, NULL); |
775 | callback(callback_param); | ||
776 | } | 774 | } |
777 | 775 | ||
778 | static irqreturn_t ep93xx_dma_interrupt(int irq, void *dev_id) | 776 | static irqreturn_t ep93xx_dma_interrupt(int irq, void *dev_id) |