summaryrefslogtreecommitdiff
path: root/drivers/dma/sh
diff options
context:
space:
mode:
authorBaolin Wang <baolin.wang@linaro.org>2019-05-20 14:32:21 +0300
committerVinod Koul <vkoul@kernel.org>2019-05-27 08:53:53 +0300
commitc54d86641fe774154b7742b765e3e2f8affcb7e6 (patch)
treeda8bdd900a7577ae24fda27de1c623b77b89a061 /drivers/dma/sh
parent1dc1b29aa15ead508142bb109ef52686213d07f4 (diff)
downloadlinux-c54d86641fe774154b7742b765e3e2f8affcb7e6.tar.xz
dmaengine: sh: usb-dmac: 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/sh')
-rw-r--r--drivers/dma/sh/usb-dmac.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/dma/sh/usb-dmac.c b/drivers/dma/sh/usb-dmac.c
index 59403f6d008a..0afabf395930 100644
--- a/drivers/dma/sh/usb-dmac.c
+++ b/drivers/dma/sh/usb-dmac.c
@@ -636,9 +636,6 @@ static bool usb_dmac_chan_filter(struct dma_chan *chan, void *arg)
struct usb_dmac_chan *uchan = to_usb_dmac_chan(chan);
struct of_phandle_args *dma_spec = arg;
- if (dma_spec->np != chan->device->dev->of_node)
- return false;
-
/* USB-DMAC should be used with fixed usb controller's FIFO */
if (uchan->index != dma_spec->args[0])
return false;
@@ -659,7 +656,8 @@ static struct dma_chan *usb_dmac_of_xlate(struct of_phandle_args *dma_spec,
dma_cap_zero(mask);
dma_cap_set(DMA_SLAVE, mask);
- chan = dma_request_channel(mask, usb_dmac_chan_filter, dma_spec);
+ chan = __dma_request_channel(&mask, usb_dmac_chan_filter, dma_spec,
+ ofdma->of_node);
if (!chan)
return NULL;