Commit 90f79ac5 authored by Yangtao Li's avatar Yangtao Li Committed by Stephen Boyd
Browse files

clk: socfpga: agilex: Convert to devm_platform_ioremap_resource()



Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: default avatarYangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230705065313.67043-11-frank.li@vivo.com


Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent 183a1f1b
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -457,12 +457,10 @@ static int agilex_clkmgr_init(struct platform_device *pdev)
	struct device_node *np = pdev->dev.of_node;
	struct device *dev = &pdev->dev;
	struct stratix10_clock_data *clk_data;
	struct resource *res;
	void __iomem *base;
	int i, num_clks;

	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
	base = devm_ioremap_resource(dev, res);
	base = devm_platform_ioremap_resource(pdev, 0);
	if (IS_ERR(base))
		return PTR_ERR(base);