From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Vinod Koul <vinod.koul@intel.com>,
linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org,
Peter Hurley <peter@hurleysoftware.com>,
linux-serial@vger.kernel.org
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: [PATCH v1 1/2] dmaengine: slave means at least one of DMA_SLAVE, DMA_CYCLIC
Date: Wed, 4 May 2016 22:29:39 +0300 [thread overview]
Message-ID: <1462390180-82368-2-git-send-email-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <1462390180-82368-1-git-send-email-andriy.shevchenko@linux.intel.com>
When check for capabilities recognize slave support by eother 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>
---
drivers/dma/dmaengine.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c
index 5ff79a0..59eb4fa 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;
/*
--
2.8.1
next prev parent reply other threads:[~2016-05-04 19:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-04 19:29 [PATCH v1 0/2] dmaengine: urgent fix to prevent regression in UART Andy Shevchenko
2016-05-04 19:29 ` Andy Shevchenko [this message]
2016-05-10 15:56 ` [PATCH v1 1/2] dmaengine: slave means at least one of DMA_SLAVE, DMA_CYCLIC Vinod Koul
2016-05-10 16:01 ` Andy Shevchenko
2016-05-10 16:13 ` Vinod Koul
2016-05-04 19:29 ` [PATCH v1 2/2] dmaengine: rename cmd_pause to cmd_suspend Andy Shevchenko
2016-05-10 15:59 ` Vinod Koul
2016-05-10 16:00 ` Andy Shevchenko
2016-05-10 16:11 ` Vinod Koul
2016-05-06 13:38 ` [PATCH v1 0/2] dmaengine: urgent fix to prevent regression in UART Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1462390180-82368-2-git-send-email-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=peter@hurleysoftware.com \
--cc=vinod.koul@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).