Re: [PATCH 01/40] dmaengine: Add helper function to prep for error reporting

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

 



On 07/14/2016 11:56 PM, Dave Jiang wrote:
> Adding dmaengine core helper function in order to prep for error
> reporting.
> 
> Signed-off-by: Dave Jiang <dave.jiang@xxxxxxxxx>
> ---
>  include/linux/dmaengine.h |   20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
> 
> diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
> index 30de019..b601f23 100644
> --- a/include/linux/dmaengine.h
> +++ b/include/linux/dmaengine.h

This should go into drivers/linux/dmaengine.h. These functions are not part
of the consumer API and should only be used by the provider drivers.

> @@ -1372,6 +1372,26 @@ static inline int dmaengine_desc_free(struct dma_async_tx_descriptor *desc)
>  		return -EPERM;
>  }
>  
> +struct dma_desc_callback {
> +	dma_async_tx_callback callback;
> +	void *callback_param;
> +};
> +
> +static inline void
> +dmaengine_desc_get_callback(struct dma_async_tx_descriptor *tx,
> +			    struct dma_desc_callback *cb)
> +{
> +	cb->callback = tx->callback;
> +	cb->callback_param = tx->callback_param;
> +}
> +
> +static inline void
> +dmaengine_desc_callback_invoke(struct dma_desc_callback *cb, void *result)
> +{
> +	if (cb->callback)
> +		cb->callback(cb->callback_param);
> +}
> +
>  /* --- DMA device --- */
>  
>  int dma_async_device_register(struct dma_device *device);
> 

--
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