Re: [PATCH v3 03/41] dmaengine: at_xdmac: convert callback to helper function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 18, 2016 at 02:48:02PM -0700, Dave Jiang wrote:
> Convert driver to use the new helper function for callback
> 
> Signed-off-by: Dave Jiang <dave.jiang@xxxxxxxxx>
Acked-by: Ludovic Desroches <ludovic.desroches@xxxxxxxxx>

> Cc: Ludovic Desroches <ludovic.desroches@xxxxxxxxx>
> ---
>  drivers/dma/at_xdmac.c |   13 +++++++++----
>  1 file changed, 9 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c
> index 75bd662..1f0a656 100644
> --- a/drivers/dma/at_xdmac.c
> +++ b/drivers/dma/at_xdmac.c
> @@ -1568,12 +1568,13 @@ static void at_xdmac_handle_cyclic(struct at_xdmac_chan *atchan)
>  {
>  	struct at_xdmac_desc		*desc;
>  	struct dma_async_tx_descriptor	*txd;
> +	struct dmaengine_desc_callback	cb;
>  
>  	desc = list_first_entry(&atchan->xfers_list, struct at_xdmac_desc, xfer_node);
>  	txd = &desc->tx_dma_desc;
>  
> -	if (txd->callback && (txd->flags & DMA_PREP_INTERRUPT))
> -		txd->callback(txd->callback_param);
> +	if (txd->flags & DMA_PREP_INTERRUPT)
> +		dmaengine_desc_get_callback_invoke(txd, &cb, NULL);
>  }
>  
>  static void at_xdmac_tasklet(unsigned long data)
> @@ -1615,9 +1616,13 @@ static void at_xdmac_tasklet(unsigned long data)
>  		spin_unlock_bh(&atchan->lock);
>  
>  		if (!at_xdmac_chan_is_cyclic(atchan)) {
> +			struct dmaengine_desc_callback	cb;
> +
>  			dma_cookie_complete(txd);
> -			if (txd->callback && (txd->flags & DMA_PREP_INTERRUPT))
> -				txd->callback(txd->callback_param);
> +			if (txd->flags & DMA_PREP_INTERRUPT) {
> +				dmaengine_desc_get_callback_invoke(txd, &cb,
> +								   NULL);
> +			}
>  		}
>  
>  		dma_run_dependencies(txd);
> 
--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux