dmaengine: core: Use IS_ENABLED() instead of checking for built-in or module
authorJavier Martinez Canillas <javier@osg.samsung.com>
Wed, 11 May 2016 17:39:27 +0000 (13:39 -0400)
committerVinod Koul <vinod.koul@intel.com>
Sat, 14 May 2016 08:02:03 +0000 (13:32 +0530)
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>
drivers/dma/dmaengine.c

index 42ef3457f39ec4db3e425e85ba7fadb7a3fc43c3..2432c2a5557057cd1367f272df955f3b09de5506 100644 (file)
@@ -863,12 +863,12 @@ static bool device_has_all_tx_types(struct dma_device *device)
                return false;
        #endif
 
-       #if defined(CONFIG_ASYNC_MEMCPY) || defined(CONFIG_ASYNC_MEMCPY_MODULE)
+       #if IS_ENABLED(CONFIG_ASYNC_MEMCPY)
        if (!dma_has_cap(DMA_MEMCPY, device->cap_mask))
                return false;
        #endif
 
-       #if defined(CONFIG_ASYNC_XOR) || defined(CONFIG_ASYNC_XOR_MODULE)
+       #if IS_ENABLED(CONFIG_ASYNC_XOR)
        if (!dma_has_cap(DMA_XOR, device->cap_mask))
                return false;
 
@@ -878,7 +878,7 @@ static bool device_has_all_tx_types(struct dma_device *device)
        #endif
        #endif
 
-       #if defined(CONFIG_ASYNC_PQ) || defined(CONFIG_ASYNC_PQ_MODULE)
+       #if IS_ENABLED(CONFIG_ASYNC_PQ)
        if (!dma_has_cap(DMA_PQ, device->cap_mask))
                return false;