diff options
author | Baolin Wang <baolin.wang@linaro.org> | 2019-05-20 07:32:19 -0400 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2019-05-27 01:53:52 -0400 |
commit | caf5e3e6e14d0b7df5c404683ff5d4fce4733a99 (patch) | |
tree | 6a25b4dcd8dc7fc5acdd1b22abf1ca5492f07368 /drivers/dma | |
parent | 1d967195fd456ae0e5425ee39611455de32dc9de (diff) |
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: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/mxs-dma.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/dma/mxs-dma.c b/drivers/dma/mxs-dma.c index 22cc7f68ef6e..8ce5e790352f 100644 --- a/drivers/dma/mxs-dma.c +++ b/drivers/dma/mxs-dma.c | |||
@@ -716,7 +716,6 @@ err_out: | |||
716 | } | 716 | } |
717 | 717 | ||
718 | struct mxs_dma_filter_param { | 718 | struct mxs_dma_filter_param { |
719 | struct device_node *of_node; | ||
720 | unsigned int chan_id; | 719 | unsigned int chan_id; |
721 | }; | 720 | }; |
722 | 721 | ||
@@ -727,9 +726,6 @@ static bool mxs_dma_filter_fn(struct dma_chan *chan, void *fn_param) | |||
727 | struct mxs_dma_engine *mxs_dma = mxs_chan->mxs_dma; | 726 | struct mxs_dma_engine *mxs_dma = mxs_chan->mxs_dma; |
728 | int chan_irq; | 727 | int chan_irq; |
729 | 728 | ||
730 | if (mxs_dma->dma_device.dev->of_node != param->of_node) | ||
731 | return false; | ||
732 | |||
733 | if (chan->chan_id != param->chan_id) | 729 | if (chan->chan_id != param->chan_id) |
734 | return false; | 730 | return false; |
735 | 731 | ||
@@ -752,13 +748,13 @@ static struct dma_chan *mxs_dma_xlate(struct of_phandle_args *dma_spec, | |||
752 | if (dma_spec->args_count != 1) | 748 | if (dma_spec->args_count != 1) |
753 | return NULL; | 749 | return NULL; |
754 | 750 | ||
755 | param.of_node = ofdma->of_node; | ||
756 | param.chan_id = dma_spec->args[0]; | 751 | param.chan_id = dma_spec->args[0]; |
757 | 752 | ||
758 | if (param.chan_id >= mxs_dma->nr_channels) | 753 | if (param.chan_id >= mxs_dma->nr_channels) |
759 | return NULL; | 754 | return NULL; |
760 | 755 | ||
761 | return dma_request_channel(mask, mxs_dma_filter_fn, ¶m); | 756 | return __dma_request_channel(&mask, mxs_dma_filter_fn, ¶m, |
757 | ofdma->of_node); | ||
762 | } | 758 | } |
763 | 759 | ||
764 | static int __init mxs_dma_probe(struct platform_device *pdev) | 760 | static int __init mxs_dma_probe(struct platform_device *pdev) |