mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-10 07:00:48 +00:00
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>
This commit is contained in:
parent
8c9f7aa316
commit
e8d9f875c9
@ -1432,7 +1432,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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user