Skip to content

Commit 90f79ac

Browse files
bbkzzbebarino
authored andcommitted
clk: socfpga: agilex: Convert to devm_platform_ioremap_resource()
Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li <frank.li@vivo.com> Link: https://lore.kernel.org/r/20230705065313.67043-11-frank.li@vivo.com Signed-off-by: Stephen Boyd <sboyd@kernel.org>
1 parent 183a1f1 commit 90f79ac

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/clk/socfpga/clk-agilex.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -457,12 +457,10 @@ static int agilex_clkmgr_init(struct platform_device *pdev)
457457
struct device_node *np = pdev->dev.of_node;
458458
struct device *dev = &pdev->dev;
459459
struct stratix10_clock_data *clk_data;
460-
struct resource *res;
461460
void __iomem *base;
462461
int i, num_clks;
463462

464-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
465-
base = devm_ioremap_resource(dev, res);
463+
base = devm_platform_ioremap_resource(pdev, 0);
466464
if (IS_ERR(base))
467465
return PTR_ERR(base);
468466

0 commit comments

Comments
 (0)