From: Andy Shevchenko Date: Tue, 10 May 2016 17:43:34 +0000 (+0300) Subject: dmaengine: slave means at least one of DMA_SLAVE, DMA_CYCLIC X-Git-Tag: v4.14-rc1~3210^2~11^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dd4e91d538b3d16d5241575a3fb654a9aa50392c;p=platform%2Fkernel%2Flinux-rpi.git dmaengine: slave means at least one of DMA_SLAVE, DMA_CYCLIC 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 Signed-off-by: Vinod Koul --- diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c index 3e55755..42ef345 100644 --- a/drivers/dma/dmaengine.c +++ b/drivers/dma/dmaengine.c @@ -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; /*