From: Lars-Peter Clausen <lars@metafoo.de>
To: Shawn Guo <shawn.guo@linaro.org>
Cc: alsa-devel@alsa-project.org, Mark Brown <broonie@kernel.org>
Subject: Re: [PATCH] ASoC: generic-dmaengine-pcm: call dma_request_slave_channel()
Date: Mon, 22 Apr 2013 16:16:02 +0200 [thread overview]
Message-ID: <51754622.3050801@metafoo.de> (raw)
In-Reply-To: <1366639044-27695-1-git-send-email-shawn.guo@linaro.org>
On 04/22/2013 03:57 PM, Shawn Guo wrote:
> dma_request_slave_channel() is a more appropriate API for dmaengine
> clients that adopt generic DMA bindings to call. Let's use it instead
> of of_dma_request_slave_channel() to save <linux/of_dma.h> include.
>
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
I'm not a 100% convinced about this one, but I guess it wont hurt, so
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
> ---
> sound/soc/soc-generic-dmaengine-pcm.c | 11 +++++------
> 1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/sound/soc/soc-generic-dmaengine-pcm.c b/sound/soc/soc-generic-dmaengine-pcm.c
> index 98e1310..e29ec3c 100644
> --- a/sound/soc/soc-generic-dmaengine-pcm.c
> +++ b/sound/soc/soc-generic-dmaengine-pcm.c
> @@ -21,7 +21,6 @@
> #include <sound/soc.h>
> #include <linux/dma-mapping.h>
> #include <linux/of.h>
> -#include <linux/of_dma.h>
>
> #include <sound/dmaengine_pcm.h>
>
> @@ -219,19 +218,19 @@ 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;
>
> - if ((pcm->flags & SND_DMAENGINE_PCM_FLAG_NO_DT) || !of_node)
> + if ((pcm->flags & SND_DMAENGINE_PCM_FLAG_NO_DT) || !dev->of_node)
> return;
>
> if (pcm->flags & SND_DMAENGINE_PCM_FLAG_HALF_DUPLEX) {
> - pcm->chan[0] = of_dma_request_slave_channel(of_node, "rx-tx");
> + pcm->chan[0] = dma_request_slave_channel(dev, "rx-tx");
> 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 +254,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,
next prev parent reply other threads:[~2013-04-22 14:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-22 13:57 [PATCH] ASoC: generic-dmaengine-pcm: call dma_request_slave_channel() Shawn Guo
2013-04-22 14:16 ` Lars-Peter Clausen [this message]
2013-04-23 10:35 ` Mark Brown
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=51754622.3050801@metafoo.de \
--to=lars@metafoo.de \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=shawn.guo@linaro.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;
as well as URLs for NNTP newsgroup(s).