Re: [PATCH v3 25/41] dmaengine: qcom_hidma: convert callback to helper function

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

 



On 7/18/2016 5:50 PM, Dave Jiang wrote:
> list_for_each_entry_safe(mdesc, tmp, &list, node) {
>  		struct dma_async_tx_descriptor *txd = &mdesc->desc;
> -		dma_async_tx_callback callback = mdesc->desc.callback;
> -		void *param = mdesc->desc.callback_param;
> +		struct dmaengine_desc_callback cb;
>  
> +		dmaengine_desc_get_callback(&mdesc->desc, &cb);
>  		dma_descriptor_unmap(txd);
>  
> -		if (callback)
> -			callback(param);
> +		dmaengine_desc_callback_invoke(&cb, NULL);

This could have been done as 

+			struct dmaengine_desc_callback cb;
+
+			dmaengine_desc_get_callback_invoke(desc, &cb, NULL);

too.

-- 
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.
--
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