Skip to content

Commit c54d866

Browse files
wangbaolin719vinodkoul
authored andcommitted
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>
1 parent 1dc1b29 commit c54d866

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

‎drivers/dma/sh/usb-dmac.c‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -636,9 +636,6 @@ static bool usb_dmac_chan_filter(struct dma_chan *chan, void *arg)
636636
struct usb_dmac_chan *uchan = to_usb_dmac_chan(chan);
637637
struct of_phandle_args *dma_spec = arg;
638638

639-
if (dma_spec->np != chan->device->dev->of_node)
640-
return false;
641-
642639
/* USB-DMAC should be used with fixed usb controller's FIFO */
643640
if (uchan->index != dma_spec->args[0])
644641
return false;
@@ -659,7 +656,8 @@ static struct dma_chan *usb_dmac_of_xlate(struct of_phandle_args *dma_spec,
659656
dma_cap_zero(mask);
660657
dma_cap_set(DMA_SLAVE, mask);
661658

662-
chan = dma_request_channel(mask, usb_dmac_chan_filter, dma_spec);
659+
chan = __dma_request_channel(&mask, usb_dmac_chan_filter, dma_spec,
660+
ofdma->of_node);
663661
if (!chan)
664662
return NULL;
665663

0 commit comments

Comments
 (0)