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 Thu, Jul 14, 2016 at 02:56:52PM -0700, 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
> @@ -1372,6 +1372,26 @@ static inline int dmaengine_desc_free(struct dma_async_tx_descriptor *desc)
>  		return -EPERM;
>  }
>  
> +struct dma_desc_callback {

can we name this dmaengine_desc_callback. I am avoiding using dma and
encouraging dmanegine use for new stuff :)

> +	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);
> +}
> +

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