dmaengine: add DMA_CYCLIC to dma_get_slave_caps
authorVinod Koul <vinod.koul@intel.com>
Tue, 5 Apr 2016 22:31:33 +0000 (15:31 -0700)
committerVinod Koul <vinod.koul@intel.com>
Tue, 5 Apr 2016 22:31:33 +0000 (15:31 -0700)
dma_get_slave_caps() API only checked for slave capability where
we use slave capabilities for cyclic dma operations as well, so we
should add the cyclic case here too.

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

index 0cb259c59916ac0cadd4a3c3f7e5d4ae7fa2a1d8..3e55755e0ff1634882ca5fae377e5aa5fe583223 100644 (file)
@@ -482,7 +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))
+       if ((!test_bit(DMA_SLAVE, device->cap_mask.bits)) ||
+                       (!test_bit(DMA_CYCLIC, device->cap_mask.bits)))
                return -ENXIO;
 
        /*