Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dmaengine: core: Use IS_ENABLED() instead of checking for built-in or module

The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either
built-in or as a module, use that macro instead of open coding the same.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>

authored by

Javier Martinez Canillas and committed by
Vinod Koul
d57d3a48 dd4e91d5

+3 -3
+3 -3
drivers/dma/dmaengine.c
··· 863 863 return false; 864 864 #endif 865 865 866 - #if defined(CONFIG_ASYNC_MEMCPY) || defined(CONFIG_ASYNC_MEMCPY_MODULE) 866 + #if IS_ENABLED(CONFIG_ASYNC_MEMCPY) 867 867 if (!dma_has_cap(DMA_MEMCPY, device->cap_mask)) 868 868 return false; 869 869 #endif 870 870 871 - #if defined(CONFIG_ASYNC_XOR) || defined(CONFIG_ASYNC_XOR_MODULE) 871 + #if IS_ENABLED(CONFIG_ASYNC_XOR) 872 872 if (!dma_has_cap(DMA_XOR, device->cap_mask)) 873 873 return false; 874 874 ··· 878 878 #endif 879 879 #endif 880 880 881 - #if defined(CONFIG_ASYNC_PQ) || defined(CONFIG_ASYNC_PQ_MODULE) 881 + #if IS_ENABLED(CONFIG_ASYNC_PQ) 882 882 if (!dma_has_cap(DMA_PQ, device->cap_mask)) 883 883 return false; 884 884