Skip to content

Commit ee4abc4

Browse files
caihuoqing1990bebarino
authored andcommitted
clk: socfpga: agilex: Make use of the helper function devm_platform_ioremap_resource()
Use the devm_platform_ioremap_resource() helper instead of calling platform_get_resource() and devm_ioremap_resource() separately Signed-off-by: Cai Huoqing <caihuoqing@baidu.com> Link: https://lore.kernel.org/r/20210907085137.4407-1-caihuoqing@baidu.com Signed-off-by: Stephen Boyd <sboyd@kernel.org>
1 parent 5c58585 commit ee4abc4

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
@@ -500,12 +500,10 @@ static int n5x_clkmgr_init(struct platform_device *pdev)
500500
struct device_node *np = pdev->dev.of_node;
501501
struct device *dev = &pdev->dev;
502502
struct stratix10_clock_data *clk_data;
503-
struct resource *res;
504503
void __iomem *base;
505504
int i, num_clks;
506505

507-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
508-
base = devm_ioremap_resource(dev, res);
506+
base = devm_platform_ioremap_resource(pdev, 0);
509507
if (IS_ERR(base))
510508
return PTR_ERR(base);
511509

0 commit comments

Comments
 (0)