aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@st.com>2012-02-01 05:42:21 -0500
committerVinod Koul <vinod.koul@linux.intel.com>2012-02-22 07:45:38 -0500
commite8d9f875c9b02bb56ba3bb44834ae81ba0e8efbc (patch)
tree60aee6edfd2bd1b4c460039c54106560d014ff4f
parent8c9f7aa316f547f70d270a08d1212f958721c071 (diff)
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@st.com> Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
-rw-r--r--drivers/dma/dw_dmac.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c
index 3a3d7edcd553..157739423734 100644
--- a/drivers/dma/dw_dmac.c
+++ b/drivers/dma/dw_dmac.c
@@ -1432,7 +1432,7 @@ static int __init dw_probe(struct platform_device *pdev)
1432 1432
1433 /* 7 is highest priority & 0 is lowest. */ 1433 /* 7 is highest priority & 0 is lowest. */
1434 if (pdata->chan_priority == CHAN_PRIORITY_ASCENDING) 1434 if (pdata->chan_priority == CHAN_PRIORITY_ASCENDING)
1435 dwc->priority = 7 - i; 1435 dwc->priority = pdata->nr_channels - i - 1;
1436 else 1436 else
1437 dwc->priority = i; 1437 dwc->priority = i;
1438 1438