summary refs log tree commit diff
path: root/drivers/dma/imx-sdma.c
diff options
context:
space:
mode:
authorBaolin Wang <baolin.wang@linaro.org>2019-05-20 19:32:16 +0800
committerVinod Koul <vkoul@kernel.org>2019-05-27 11:23:52 +0530
commit990c0b53bf6599a9c9c7df1529dde681dee6cf64 (patch)
tree0025b221e849ed2d035268f3e786828737c311ff /drivers/dma/imx-sdma.c
parent37c0afeb41f1c6061b8c5fec1eeec36117bd1193 (diff)
downloadlinux-990c0b53bf6599a9c9c7df1529dde681dee6cf64.tar.gz
dmaengine: imx-sdma: Let the core do the device node validation
Let the DMA engine core do the device node validation instead of drivers.

Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma/imx-sdma.c')
-rw-r--r--drivers/dma/imx-sdma.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
index 99d9f431ae2c..ca296f0849ef 100644
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -1934,16 +1934,11 @@ disable_clk_ipg:
 static bool sdma_filter_fn(struct dma_chan *chan, void *fn_param)
 {
 	struct sdma_channel *sdmac = to_sdma_chan(chan);
-	struct sdma_engine *sdma = sdmac->sdma;
 	struct imx_dma_data *data = fn_param;
 
 	if (!imx_dma_is_general_purpose(chan))
 		return false;
 
-	/* return false if it's not the right device */
-	if (sdma->dev->of_node != data->of_node)
-		return false;
-
 	sdmac->data = *data;
 	chan->private = &sdmac->data;
 
@@ -1971,9 +1966,9 @@ static struct dma_chan *sdma_xlate(struct of_phandle_args *dma_spec,
 	 * be set to sdmac->event_id1.
 	 */
 	data.dma_request2 = 0;
-	data.of_node = ofdma->of_node;
 
-	return dma_request_channel(mask, sdma_filter_fn, &data);
+	return __dma_request_channel(&mask, sdma_filter_fn, &data,
+				     ofdma->of_node);
 }
 
 static int sdma_probe(struct platform_device *pdev)