diff options
| author | Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com> | 2019-09-26 16:20:59 +0530 |
|---|---|---|
| committer | Vinod Koul <vkoul@kernel.org> | 2019-10-15 15:41:46 +0530 |
| commit | a8bd47542863947e2433db35558477caf0d89995 (patch) | |
| tree | 00b7bc1eadd0085b15454a59dc9ad0f3b2a1fb19 /drivers/dma | |
| parent | dmaengine: iop-adma: make array 'handler' static const, makes object smaller (diff) | |
| download | linux-a8bd47542863947e2433db35558477caf0d89995.tar.gz linux-a8bd47542863947e2433db35558477caf0d89995.zip | |
dmaengine: xilinx_dma: use devm_platform_ioremap_resource()
Replace the chain of platform_get_resource() and devm_ioremap_resource()
with devm_platform_ioremap_resource(). It simplifies the flow and there
is no functional change.
Fixes below cocinelle warning-
WARNING: Use devm_platform_ioremap_resource for xdev -> regs
Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
Link: https://lore.kernel.org/r/1569495060-18117-4-git-send-email-radhey.shyam.pandey@xilinx.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma')
| -rw-r--r-- | drivers/dma/xilinx/xilinx_dma.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c index e7dc3c4dc8e0..fb87d0a62b26 100644 --- a/drivers/dma/xilinx/xilinx_dma.c +++ b/drivers/dma/xilinx/xilinx_dma.c @@ -2604,7 +2604,6 @@ static int xilinx_dma_probe(struct platform_device *pdev) struct device_node *node = pdev->dev.of_node; struct xilinx_dma_device *xdev; struct device_node *child, *np = pdev->dev.of_node; - struct resource *io; u32 num_frames, addr_width, len_width; int i, err; @@ -2630,8 +2629,7 @@ static int xilinx_dma_probe(struct platform_device *pdev) return err; /* Request and map I/O memory */ - io = platform_get_resource(pdev, IORESOURCE_MEM, 0); - xdev->regs = devm_ioremap_resource(&pdev->dev, io); + xdev->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(xdev->regs)) return PTR_ERR(xdev->regs); |
