[alsa-devel] [PATCH V2 REPOST] ASoC: dmaengine: support deferred probe for DMA channels
Stephen Warren
swarren at wwwdotorg.org
Tue Dec 10 19:11:16 CET 2013
On 12/10/2013 11:06 AM, Lars-Peter Clausen wrote:
> On 12/10/2013 06:59 PM, Stephen Warren wrote:
>> From: Stephen Warren <swarren at 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 at nvidia.com>
>> Acked-by: Lars-Peter Clausen <lars at 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.
Hmm. It doesn't complain for some reason, but I'll fix that and repost.
More information about the Alsa-devel
mailing list