public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@st.com>
To: Barry Song <Baohua.Song@csr.com>
Cc: "vinod.koul@intel.com" <vinod.koul@intel.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"workgroup.linux@csr.com" <workgroup.linux@csr.com>,
	Nicolas Ferre <nicolas.ferre@atmel.com>,
	Piotr Ziecik <kosmo@semihalf.com>,
	Yong Wang <yong.y.wang@intel.com>,
	Jaswinder Singh <jassi.brar@samsung.com>,
	Pelagicore AB <info@pelagicore.com>
Subject: Re: [PATCH] dmaengine: delete redundant chan_id and chancnt initialization in dma drivers
Date: Fri, 16 Sep 2011 11:01:10 +0530	[thread overview]
Message-ID: <4E72DF1E.3080301@st.com> (raw)
In-Reply-To: <1316081190-29777-1-git-send-email-Baohua.Song@csr.com>

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@st.com>

-- 
viresh

  reply	other threads:[~2011-09-16  5:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-15 10:06 [PATCH] dmaengine: delete redundant chan_id and chancnt initialization in dma drivers Barry Song
2011-09-16  5:31 ` Viresh Kumar [this message]
2011-09-20  9:41 ` Vinod Koul
  -- strict thread matches above, loose matches on Subject: below --
2011-09-16  9:43 Barry Song
2011-09-21  8:27 ` Jassi Brar
2011-09-22  0:08   ` Barry Song
2011-09-22  5:41     ` Jassi Brar
2011-09-22  5:55       ` Barry Song
2011-09-22  6:26       ` Jassi Brar
2011-09-22  6:31         ` Barry Song
2011-09-22  6:38           ` Jassi Brar
2011-09-22  6:42             ` Barry Song
2011-09-22  8:22     ` Russell King - ARM Linux

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E72DF1E.3080301@st.com \
    --to=viresh.kumar@st.com \
    --cc=Baohua.Song@csr.com \
    --cc=info@pelagicore.com \
    --cc=jassi.brar@samsung.com \
    --cc=kosmo@semihalf.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nicolas.ferre@atmel.com \
    --cc=vinod.koul@intel.com \
    --cc=workgroup.linux@csr.com \
    --cc=yong.y.wang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox