Skip to content

Commit

Permalink
dmaengine/dw_dmac: Don't use magic number for total number of channels
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Viresh Kumar authored and Vinod Koul committed Feb 22, 2012
1 parent 8c9f7aa commit e8d9f87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/dma/dw_dmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit e8d9f87

Please sign in to comment.