dmaengine: Simplify dma_async_device_register()
authorYajun Deng <yajun.deng@linux.dev>
Tue, 15 Aug 2023 07:23:46 +0000 (15:23 +0800)
committerVinod Koul <vkoul@kernel.org>
Mon, 21 Aug 2023 13:06:46 +0000 (18:36 +0530)
commit81ebed8aa2c213939a4670f508031a57d4ecbb70
tree081a51de86d69ad862a7e3a12b4e515100132b54
parent33a0b734543ed5a44135e15f00429b94f75f2866
dmaengine: Simplify dma_async_device_register()

There are a lot of duplicate codes for checking if the dma has some
capability.

Define a temporary macro that is used to check if the dma claims some
capability and if the corresponding function is implemented.

Signed-off-by: Yajun Deng <yajun.deng@linux.dev>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/20230815072346.2798927-1-yajun.deng@linux.dev
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/dmaengine.c