From: Sylwester Nawrocki Date: Thu, 7 Feb 2019 17:00:09 +0000 (+0100) Subject: ASoC: dmaengine: Improve of_node test in dmaengine_pcm_request_chan_of() X-Git-Tag: accepted/tizen/unified/20190330.030053~52 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b45cafeedc94cac52812333c6cc72b37333d27ba;p=platform%2Fkernel%2Flinux-exynos.git 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. Change-Id: Icac9da759fdefa367492f5d0ad0ff031a7b0bb62 Signed-off-by: Sylwester Nawrocki Acked-by: Krzysztof Kozlowski Signed-off-by: Mark Brown --- diff --git a/sound/soc/soc-generic-dmaengine-pcm.c b/sound/soc/soc-generic-dmaengine-pcm.c index d537864..613ed8c 100644 --- a/sound/soc/soc-generic-dmaengine-pcm.c +++ b/sound/soc/soc-generic-dmaengine-pcm.c @@ -360,7 +360,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) {