[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <47078aa380433c8ee0021eba231cc5965795cfcd.1324268691.git.viresh.kumar@st.com>
Date: Mon, 19 Dec 2011 10:01:00 +0530
From: Viresh Kumar <viresh.kumar@...com>
To: <dan.j.williams@...el.com>, <vinod.koul@...el.com>
Cc: <linux-kernel@...r.kernel.org>, <armando.visconti@...com>,
<shiraz.hashim@...com>, <vipin.kumar@...com>,
<rajeev-dlh.kumar@...com>, <deepak.sikri@...com>,
<vipulkumar.samar@...com>, <amit.virdi@...com>,
<viresh.kumar@...com>, <pratyush.anand@...com>,
<bhupesh.sharma@...com>, <viresh.linux@...il.com>,
<bhavna.yadav@...com>, <vincenzo.frascino@...com>,
<mirko.gardi@...com>
Subject: [PATCH V1 Resend 3/3] dmaengine/dw_dmac: Don't use magic number for total number of channels
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@...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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists