lkml.org 
[lkml]   [2012]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH V2 05/12] dmaengine/dw_dmac: Don't use magic number for total number of channels
    Date
    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>
    ---
    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 3a3d7ed..1577394 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)

    /* 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


    \
     
     \ /
      Last update: 2012-01-18 10:17    [W:0.019 / U:0.696 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site