1
0
Fork 0

ASoC: dmaengine: Improve of_node test in dmaengine_pcm_request_chan_of()

Currently when of_node of the "PCM" device is null
dmaengine_pcm_request_chan_of() function will bail out, including cases
when custom DMA device is intended to be used.  To have the channels
properly requested when custom DMA device is provided extend the of_node
test to also consider dma_dev->of_node.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
hifive-unleashed-5.1
Sylwester Nawrocki 2019-02-07 18:00:09 +01:00 committed by Mark Brown
parent 595d2f74cd
commit 51256d348c
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
1 changed files with 2 additions and 1 deletions

View File

@ -415,7 +415,8 @@ static int dmaengine_pcm_request_chan_of(struct dmaengine_pcm *pcm,
if ((pcm->flags & (SND_DMAENGINE_PCM_FLAG_NO_DT |
SND_DMAENGINE_PCM_FLAG_CUSTOM_CHANNEL_NAME)) ||
!dev->of_node)
(!dev->of_node && !(config && config->dma_dev &&
config->dma_dev->of_node)))
return 0;
if (config && config->dma_dev) {