From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: dmaengine@vger.kernel.org, Vinod Koul <vinod.koul@intel.com>
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Maxime Ripard <maxime.ripard@free-electrons.com>,
Dan Williams <dan.j.williams@intel.com>
Subject: [PATCH 08/11] dmaengine: sa11x0: Remove chancnt affectations
Date: Thu, 16 Oct 2014 11:01:00 +0200 [thread overview]
Message-ID: <1413450063-23829-9-git-send-email-maxime.ripard@free-electrons.com> (raw)
In-Reply-To: <1413450063-23829-1-git-send-email-maxime.ripard@free-electrons.com>
chanctnt is already filled by dma_async_device_register, which uses the channel
list to know how much channels there is.
Since it's already filled, we can safely remove it from the drivers' probe
function.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
drivers/dma/sa11x0-dma.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/dma/sa11x0-dma.c b/drivers/dma/sa11x0-dma.c
index 4b0ef043729a..2329d295efb5 100644
--- a/drivers/dma/sa11x0-dma.c
+++ b/drivers/dma/sa11x0-dma.c
@@ -829,7 +829,6 @@ static int sa11x0_dma_init_dmadev(struct dma_device *dmadev,
{
unsigned i;
- dmadev->chancnt = ARRAY_SIZE(chan_desc);
INIT_LIST_HEAD(&dmadev->channels);
dmadev->dev = dev;
dmadev->device_alloc_chan_resources = sa11x0_dma_alloc_chan_resources;
@@ -838,7 +837,7 @@ static int sa11x0_dma_init_dmadev(struct dma_device *dmadev,
dmadev->device_tx_status = sa11x0_dma_tx_status;
dmadev->device_issue_pending = sa11x0_dma_issue_pending;
- for (i = 0; i < dmadev->chancnt; i++) {
+ for (i = 0; i < ARRAY_SIZE(chan_desc); i++) {
struct sa11x0_dma_chan *c;
c = kzalloc(sizeof(*c), GFP_KERNEL);
--
2.1.1
next prev parent reply other threads:[~2014-10-16 9:05 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-16 9:00 [PATCH 00/11] dmaengine: Cleanup chancnt Maxime Ripard
2014-10-16 9:00 ` [PATCH 01/11] dmaengine: pl08x: Remove chancnt affectations Maxime Ripard
2014-10-16 9:00 ` [PATCH 02/11] dmaengine: bcm2835: " Maxime Ripard
2014-10-16 9:00 ` [PATCH 03/11] dmaengine: jz4740: " Maxime Ripard
2014-10-16 9:00 ` [PATCH 04/11] dmaengine: fsldma: " Maxime Ripard
2014-10-16 9:00 ` [PATCH 05/11] dmaengine: k3: " Maxime Ripard
2014-10-16 9:00 ` [PATCH 06/11] dmaengine: mpc512x: " Maxime Ripard
2014-10-16 9:00 ` [PATCH 07/11] dmaengine: omap: " Maxime Ripard
2014-10-16 9:01 ` Maxime Ripard [this message]
2014-10-16 9:01 ` [PATCH 09/11] dmaengine: sh: " Maxime Ripard
2014-10-26 16:31 ` Laurent Pinchart
2014-10-16 9:01 ` [PATCH 10/11] dmaengine: sirf: " Maxime Ripard
2014-10-16 9:01 ` [PATCH 11/11] dmaengine: sun6i: " Maxime Ripard
2014-10-16 9:03 ` [PATCH 00/11] dmaengine: Cleanup chancnt Vinod Koul
2014-11-05 13:51 ` Maxime Ripard
2014-11-06 6:06 ` Vinod Koul
2014-11-06 9:58 ` Maxime Ripard
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=1413450063-23829-9-git-send-email-maxime.ripard@free-electrons.com \
--to=maxime.ripard@free-electrons.com \
--cc=dan.j.williams@intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--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
all inboxes | Powered by JetHome®