alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Stephen Warren <swarren@wwwdotorg.org>
Cc: alsa-devel@alsa-project.org, Mark Brown <broonie@kernel.org>,
	Stephen Warren <swarren@nvidia.com>,
	Liam Girdwood <lgirdwood@gmail.com>
Subject: Re: [PATCH V2 REPOST] ASoC: dmaengine: support deferred probe for DMA channels
Date: Tue, 10 Dec 2013 19:06:41 +0100	[thread overview]
Message-ID: <52A75831.3020307@metafoo.de> (raw)
In-Reply-To: <1386698361-7910-1-git-send-email-swarren@wwwdotorg.org>

On 12/10/2013 06:59 PM, Stephen Warren wrote:
> From: Stephen Warren <swarren@nvidia.com>
> 
> Enhance dmaengine_pcm_request_chan_of() to support deferred probe for
> DMA channels, by using the new dma_request_slave_channel_or_err() API.
> This prevents snd_dmaengine_pcm_register() from succeeding without
> acquiring DMA channels due to the relevant DMA controller not yet being
> registered.
> 
> Signed-off-by: Stephen Warren <swarren@nvidia.com>
> Acked-by: Lars-Peter Clausen <lars@metafoo.de>

Still looks good, but one nitpick:

> -		pcm->chan[i] = dma_request_slave_channel(dev, name);
> +		chan = dma_request_slave_channel_reason(dev, name);
> +		if (IS_ERR(chan)) {
> +			if (PTR_ERR(pcm->chan[i]) == -EPROBE_DEFER)
> +				return -EPROBE_DEFER;
> +			pcm->chan[i] = NULL;
> +		} else
> +			pcm->chan[i] = chan;

I think checkpatch will complain about the above. There should be brackets
around the else branch.

>  		if (pcm->flags & SND_DMAENGINE_PCM_FLAG_HALF_DUPLEX)
>  			break;
>  	}
>  
[...]

  reply	other threads:[~2013-12-10 18:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-10 17:59 [PATCH V2 REPOST] ASoC: dmaengine: support deferred probe for DMA channels Stephen Warren
2013-12-10 18:06 ` Lars-Peter Clausen [this message]
2013-12-10 18:11   ` Stephen Warren

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=52A75831.3020307@metafoo.de \
    --to=lars@metafoo.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=swarren@nvidia.com \
    --cc=swarren@wwwdotorg.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).