From: Viresh Kumar <viresh.kumar@st.com>
To: <dan.j.williams@intel.com>, <vinod.koul@intel.com>
Cc: <linux-kernel@vger.kernel.org>, <armando.visconti@st.com>,
<shiraz.hashim@st.com>, <vipin.kumar@st.com>,
<rajeev-dlh.kumar@st.com>, <deepak.sikri@st.com>,
<vipulkumar.samar@st.com>, <amit.virdi@st.com>,
<viresh.kumar@st.com>, <pratyush.anand@st.com>,
<bhupesh.sharma@st.com>, <viresh.linux@gmail.com>,
<bhavna.yadav@st.com>, <vincenzo.frascino@st.com>,
<mirko.gardi@st.com>
Subject: [PATCH V1 Resend 3/3] dmaengine/dw_dmac: Don't use magic number for total number of channels
Date: Mon, 19 Dec 2011 10:01:00 +0530 [thread overview]
Message-ID: <47078aa380433c8ee0021eba231cc5965795cfcd.1324268691.git.viresh.kumar@st.com> (raw)
In-Reply-To: <cover.1324268691.git.viresh.kumar@st.com>
Total number of channels is passed in pdata->nr_channels variable, thus we must
not use magic number '7' for total number of channels.
Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
---
drivers/dma/dw_dmac.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c
index 35c8829..96b2750 100644
--- a/drivers/dma/dw_dmac.c
+++ b/drivers/dma/dw_dmac.c
@@ -1434,7 +1434,7 @@ static int __init dw_probe(struct platform_device *pdev)
/* 7 is highest priority & 0 is lowest. */
if (pdata->chan_priority == CHAN_PRIORITY_ASCENDING)
- dwc->priority = 7 - i;
+ dwc->priority = pdata->nr_channels - i - 1;
else
dwc->priority = i;
--
1.7.8.110.g4cb5d
next prev parent reply other threads:[~2011-12-19 4:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-19 4:30 [PATCH V1 Resend 0/3] dmaengine: Allow controller drivers to set channel ids Viresh Kumar
2011-12-19 4:30 ` [PATCH V1 Resend 1/3] " Viresh Kumar
2011-12-19 4:30 ` [PATCH V1 Resend 2/3] dmaengine/dw_dmac: Set channel id's in controller driver Viresh Kumar
2011-12-19 4:31 ` Viresh Kumar [this message]
2011-12-20 9:40 ` [PATCH V1 Resend 0/3] dmaengine: Allow controller drivers to set channel ids Williams, Dan J
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=47078aa380433c8ee0021eba231cc5965795cfcd.1324268691.git.viresh.kumar@st.com \
--to=viresh.kumar@st.com \
--cc=amit.virdi@st.com \
--cc=armando.visconti@st.com \
--cc=bhavna.yadav@st.com \
--cc=bhupesh.sharma@st.com \
--cc=dan.j.williams@intel.com \
--cc=deepak.sikri@st.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mirko.gardi@st.com \
--cc=pratyush.anand@st.com \
--cc=rajeev-dlh.kumar@st.com \
--cc=shiraz.hashim@st.com \
--cc=vincenzo.frascino@st.com \
--cc=vinod.koul@intel.com \
--cc=vipin.kumar@st.com \
--cc=vipulkumar.samar@st.com \
--cc=viresh.linux@gmail.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®