Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fe39e74a authored by Radhey Shyam Pandey's avatar Radhey Shyam Pandey Committed by Greg Kroah-Hartman
Browse files

dmaengine: xilinx_dma: use devm_platform_ioremap_resource()



[ Upstream commit a8bd47542863947e2433db35558477caf0d89995 ]

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: default avatarRadhey 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: default avatarVinod Koul <vkoul@kernel.org>
Stable-dep-of: 596b53ccc36a ("dmaengine: xilinx_dma: call of_node_put() when breaking out of for_each_child_of_node()")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent d3065cc5
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -2626,7 +2626,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;

@@ -2652,8 +2651,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);