mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Shawn Guo <shawn.guo@linaro.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: <linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <alsa-devel@alsa-project.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>
Subject: Re: [PATCH] ASoC: don't call of_dma_request_slave_channel directly
Date: Wed, 24 Apr 2013 09:11:55 +0800	[thread overview]
Message-ID: <20130424011153.GA2319@shlinux1.ap.freescale.net> (raw)
In-Reply-To: <1366732475-479886-3-git-send-email-arnd@arndb.de>

On Tue, Apr 23, 2013 at 05:54:33PM +0200, Arnd Bergmann wrote:
> The exported interface for device drivers is dma_request_slave_channel,
> not of_dma_request_slave_channel. The former does not depend on device
> tree but also works with ACPI and other interfaces providing an
> abstraction for DMA channels.
> 
> This fixes link errors when building ALSA as a loadable module.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

I had already sent a similar patch [1] for that.

Shawn

[1] http://thread.gmane.org/gmane.linux.alsa.devel/107568/

> Cc: alsa-devel@alsa-project.org
> Cc: Lars-Peter Clausen <lars@metafoo.de>
> Cc: Shawn Guo <shawn.guo@linaro.org>
> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
>  sound/soc/soc-generic-dmaengine-pcm.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/sound/soc/soc-generic-dmaengine-pcm.c b/sound/soc/soc-generic-dmaengine-pcm.c
> index 5fd5ed4..8ee9859 100644
> --- a/sound/soc/soc-generic-dmaengine-pcm.c
> +++ b/sound/soc/soc-generic-dmaengine-pcm.c
> @@ -219,19 +219,20 @@ static const char * const dmaengine_pcm_dma_channel_names[] = {
>  };
>  
>  static void dmaengine_pcm_request_chan_of(struct dmaengine_pcm *pcm,
> -	struct device_node *of_node)
> +	struct device *dev)
>  {
>  	unsigned int i;
> +	struct device_node *of_node = dev->of_node;
>  
>  	if ((pcm->flags & SND_DMAENGINE_PCM_FLAG_NO_DT) || !of_node)
>  		return;
>  
>  	if (pcm->flags & SND_DMAENGINE_PCM_FLAG_HALF_DUPLEX) {
> -		pcm->chan[0] = of_dma_request_slave_channel(of_node, "tx_rx");
> +		pcm->chan[0] = dma_request_slave_channel(dev, "tx_rx");
>  		pcm->chan[1] = pcm->chan[0];
>  	} else {
>  		for (i = SNDRV_PCM_STREAM_PLAYBACK; i <= SNDRV_PCM_STREAM_CAPTURE; i++) {
> -			pcm->chan[i] = of_dma_request_slave_channel(of_node,
> +			pcm->chan[i] = dma_request_slave_channel(dev,
>  					dmaengine_pcm_dma_channel_names[i]);
>  		}
>  	}
> @@ -255,7 +256,7 @@ int snd_dmaengine_pcm_register(struct device *dev,
>  	pcm->config = config;
>  	pcm->flags = flags;
>  
> -	dmaengine_pcm_request_chan_of(pcm, dev->of_node);
> +	dmaengine_pcm_request_chan_of(pcm, dev);
>  
>  	if (flags & SND_DMAENGINE_PCM_FLAG_NO_RESIDUE)
>  		return snd_soc_add_platform(dev, &pcm->platform,
> -- 
> 1.8.1.2
> 


  parent reply	other threads:[~2013-04-24  2:32 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-23 15:54 [PATCH] ARM: allmodconfig regressions in linux-next Arnd Bergmann
2013-04-23 15:54 ` [PATCH] usb: phy: phy core cannot yet be a module Arnd Bergmann
2013-04-23 16:07   ` Felipe Balbi
2013-04-23 16:11     ` Arnd Bergmann
2013-04-23 16:12       ` Felipe Balbi
2013-04-23 16:26     ` Greg Kroah-Hartman
2013-04-23 15:54 ` [PATCH] ASoC: don't call of_dma_request_slave_channel directly Arnd Bergmann
2013-04-23 15:56   ` Mark Brown
2013-04-24  1:11   ` Shawn Guo [this message]
2013-04-24 12:52     ` Arnd Bergmann
2013-04-23 15:54 ` [PATCH] hwrng: bcm2835: fix MODULE_LICENSE tag Arnd Bergmann
2013-06-18 16:57   ` Lubomir Rintel
2013-04-23 15:54 ` [PATCH] clocksource: kona: adapt to CLOCKSOURCE_OF_DECLARE change Arnd Bergmann
2013-04-26 15:42   ` Christian Daudt

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=20130424011153.GA2319@shlinux1.ap.freescale.net \
    --to=shawn.guo@linaro.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=arnd@arndb.de \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=lars@metafoo.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    /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

Powered by JetHome