summaryrefslogtreecommitdiff
path: root/drivers/dma/of-dma.c
diff options
context:
space:
mode:
authorBaolin Wang <baolin.wang@linaro.org>2019-05-20 19:32:14 +0800
committerVinod Koul <vkoul@kernel.org>2019-05-27 11:23:52 +0530
commitf5151311c3f37f6edc85b2253ccf6d3e2a4c4c26 (patch)
tree9c9a6c10e2377a16f1eb678605546875f210c8e8 /drivers/dma/of-dma.c
parentf935d7dc8125e231e3e1620d97b2367b008889f4 (diff)
downloadlwn-f5151311c3f37f6edc85b2253ccf6d3e2a4c4c26.tar.gz
lwn-f5151311c3f37f6edc85b2253ccf6d3e2a4c4c26.zip
dmaengine: Add matching device node validation in __dma_request_channel()
When user try to request one DMA channel by __dma_request_channel(), it won't validate if it is the correct DMA device to request, that will lead each DMA engine driver to validate the correct device node in their filter function if it is necessary. Thus we can add the matching device node validation in the DMA engine core, to remove all of device node validation in the drivers. Tested-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Baolin Wang <baolin.wang@linaro.org> Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma/of-dma.c')
-rw-r--r--drivers/dma/of-dma.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/dma/of-dma.c b/drivers/dma/of-dma.c
index 91fd395c90c4..6b43d04da05d 100644
--- a/drivers/dma/of-dma.c
+++ b/drivers/dma/of-dma.c
@@ -316,8 +316,8 @@ struct dma_chan *of_dma_simple_xlate(struct of_phandle_args *dma_spec,
if (count != 1)
return NULL;
- return dma_request_channel(info->dma_cap, info->filter_fn,
- &dma_spec->args[0]);
+ return __dma_request_channel(&info->dma_cap, info->filter_fn,
+ &dma_spec->args[0], dma_spec->np);
}
EXPORT_SYMBOL_GPL(of_dma_simple_xlate);