提交 e8d9f875 编写于 作者: V Viresh Kumar 提交者: Vinod Koul

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: NViresh Kumar <viresh.kumar@st.com>
Signed-off-by: NVinod Koul <vinod.koul@linux.intel.com>
上级 8c9f7aa3
...@@ -1432,7 +1432,7 @@ static int __init dw_probe(struct platform_device *pdev) ...@@ -1432,7 +1432,7 @@ static int __init dw_probe(struct platform_device *pdev)
/* 7 is highest priority & 0 is lowest. */ /* 7 is highest priority & 0 is lowest. */
if (pdata->chan_priority == CHAN_PRIORITY_ASCENDING) if (pdata->chan_priority == CHAN_PRIORITY_ASCENDING)
dwc->priority = 7 - i; dwc->priority = pdata->nr_channels - i - 1;
else else
dwc->priority = i; dwc->priority = i;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册