diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2016-05-10 19:43:34 +0200 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2016-05-12 07:44:56 +0200 |
commit | dd4e91d538b3d16d5241575a3fb654a9aa50392c (patch) | |
tree | 6d0dc2db2bb6347e567666d7fbc2a8bd8cf8d080 /drivers/dma/dmaengine.c | |
parent | dmaengine: ensure dmaengine helpers check valid callback (diff) | |
download | linux-dd4e91d538b3d16d5241575a3fb654a9aa50392c.tar.xz linux-dd4e91d538b3d16d5241575a3fb654a9aa50392c.zip |
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 <andriy.shevchenko@linux.intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/dmaengine.c')
-rw-r--r-- | drivers/dma/dmaengine.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c index 3e55755e0ff1..42ef3457f39e 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; /* |