dmaengine: slave means at least one of DMA_SLAVE, DMA_CYCLIC
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 10 May 2016 17:43:34 +0000 (20:43 +0300)
committerVinod Koul <vinod.koul@intel.com>
Thu, 12 May 2016 05:44:56 +0000 (11:14 +0530)
When check for capabilities recognize slave support by either DMA_SLAVE or
DMA_CYCLIC bit set. If we don't do that the user can't get a normally worked
DMA support for engines that doesn't have one of the mentioned bits set.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/dmaengine.c

index 3e55755e0ff1634882ca5fae377e5aa5fe583223..42ef3457f39ec4db3e425e85ba7fadb7a3fc43c3 100644 (file)
@@ -482,8 +482,8 @@ int dma_get_slave_caps(struct dma_chan *chan, struct dma_slave_caps *caps)
        device = chan->device;
 
        /* check if the channel supports slave transactions */
-       if ((!test_bit(DMA_SLAVE, device->cap_mask.bits)) ||
-                       (!test_bit(DMA_CYCLIC, device->cap_mask.bits)))
+       if (!(test_bit(DMA_SLAVE, device->cap_mask.bits) ||
+             test_bit(DMA_CYCLIC, device->cap_mask.bits)))
                return -ENXIO;
 
        /*
This page took 0.029071 seconds and 5 git commands to generate.