Skip to contentSkip to conversation

dmaengine: slave means at least one of DMA_SLAVE, DMA_CYCLIC

PATCH Applied Andy Shevchenko 2 participants 2 messages May 10, 2016 – May 12, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 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.

---
In v2:
- fix typo in the commit message
- send patch separately

 drivers/dma/dmaengine.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/dma/dmaengine.c +2 -2
index 5ff79a0..59eb4fa 100644
@@ -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;
 
 	/*
Signature · 1 line
2.8.1
Applied
#1 lore raw
Quoted 3 lines · Andy Shevchenko

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.

Applied, thanks

Signature · 1 line
~Vinod