Commit caf5e3e6 authored by Baolin Wang's avatar Baolin Wang Committed by Vinod Koul

dmaengine: mxs-dma: Let the core do the device node validation

Let the DMA engine core do the device node validation instead of drivers.
Signed-off-by: default avatarBaolin Wang <baolin.wang@linaro.org>
Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 1d967195
...@@ -716,7 +716,6 @@ static int __init mxs_dma_init(struct mxs_dma_engine *mxs_dma) ...@@ -716,7 +716,6 @@ static int __init mxs_dma_init(struct mxs_dma_engine *mxs_dma)
} }
struct mxs_dma_filter_param { struct mxs_dma_filter_param {
struct device_node *of_node;
unsigned int chan_id; unsigned int chan_id;
}; };
...@@ -727,9 +726,6 @@ static bool mxs_dma_filter_fn(struct dma_chan *chan, void *fn_param) ...@@ -727,9 +726,6 @@ static bool mxs_dma_filter_fn(struct dma_chan *chan, void *fn_param)
struct mxs_dma_engine *mxs_dma = mxs_chan->mxs_dma; struct mxs_dma_engine *mxs_dma = mxs_chan->mxs_dma;
int chan_irq; int chan_irq;
if (mxs_dma->dma_device.dev->of_node != param->of_node)
return false;
if (chan->chan_id != param->chan_id) if (chan->chan_id != param->chan_id)
return false; return false;
...@@ -752,13 +748,13 @@ static struct dma_chan *mxs_dma_xlate(struct of_phandle_args *dma_spec, ...@@ -752,13 +748,13 @@ static struct dma_chan *mxs_dma_xlate(struct of_phandle_args *dma_spec,
if (dma_spec->args_count != 1) if (dma_spec->args_count != 1)
return NULL; return NULL;
param.of_node = ofdma->of_node;
param.chan_id = dma_spec->args[0]; param.chan_id = dma_spec->args[0];
if (param.chan_id >= mxs_dma->nr_channels) if (param.chan_id >= mxs_dma->nr_channels)
return NULL; return NULL;
return dma_request_channel(mask, mxs_dma_filter_fn, &param); return __dma_request_channel(&mask, mxs_dma_filter_fn, &param,
ofdma->of_node);
} }
static int __init mxs_dma_probe(struct platform_device *pdev) static int __init mxs_dma_probe(struct platform_device *pdev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment