[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4E72DF1E.3080301@st.com>
Date: Fri, 16 Sep 2011 11:01:10 +0530
From: Viresh Kumar <viresh.kumar@...com>
To: Barry Song <Baohua.Song@....com>
Cc: "vinod.koul@...el.com" <vinod.koul@...el.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"workgroup.linux@....com" <workgroup.linux@....com>,
Nicolas Ferre <nicolas.ferre@...el.com>,
Piotr Ziecik <kosmo@...ihalf.com>,
Yong Wang <yong.y.wang@...el.com>,
Jaswinder Singh <jassi.brar@...sung.com>,
Pelagicore AB <info@...agicore.com>
Subject: Re: [PATCH] dmaengine: delete redundant chan_id and chancnt initialization
in dma drivers
On 9/15/2011 3:36 PM, Barry Song wrote:
> dma_async_device_register will re-init chan_id and chancnt,
> so whatever chan_id and chancnt are set in drivers, they will
> be re-written by dma_async_device_register.
>
> diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c
> index 4d180ca..9bfd6d3 100644
> --- a/drivers/dma/dw_dmac.c
> +++ b/drivers/dma/dw_dmac.c
> @@ -1407,12 +1407,11 @@ static int __init dw_probe(struct platform_device *pdev)
> dw->all_chan_mask = (1 << pdata->nr_channels) - 1;
>
> INIT_LIST_HEAD(&dw->dma.channels);
> - for (i = 0; i < pdata->nr_channels; i++, dw->dma.chancnt++) {
> + for (i = 0; i < pdata->nr_channels; i++) {
> struct dw_dma_chan *dwc = &dw->chan[i];
>
> dwc->chan.device = &dw->dma;
> dwc->chan.cookie = dwc->completed = 1;
> - dwc->chan.chan_id = i;
> if (pdata->chan_allocation_order == CHAN_ALLOCATION_ASCENDING)
> list_add_tail(&dwc->chan.device_node,
> &dw->dma.channels);
> @@ -1468,7 +1467,7 @@ static int __init dw_probe(struct platform_device *pdev)
> dma_writel(dw, CFG, DW_CFG_DMA_EN);
>
> printk(KERN_INFO "%s: DesignWare DMA Controller, %d channels\n",
> - dev_name(&pdev->dev), dw->dma.chancnt);
> + dev_name(&pdev->dev), pdata->nr_channels);
>
> dma_async_device_register(&dw->dma);
>
Acked-by: Viresh Kumar <viresh.kumar@...com>
--
viresh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists