Skip to content

Commit b739bca

Browse files
caihuoqing1990bebarino
authored andcommitted
clk: socfpga: s10: 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/20210907085144.4458-1-caihuoqing@baidu.com Signed-off-by: Stephen Boyd <sboyd@kernel.org>
1 parent ee4abc4 commit b739bca

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/clk/socfpga/clk-s10.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -388,12 +388,10 @@ static int s10_clkmgr_init(struct platform_device *pdev)
388388
struct device_node *np = pdev->dev.of_node;
389389
struct device *dev = &pdev->dev;
390390
struct stratix10_clock_data *clk_data;
391-
struct resource *res;
392391
void __iomem *base;
393392
int i, num_clks;
394393

395-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
396-
base = devm_ioremap_resource(dev, res);
394+
base = devm_platform_ioremap_resource(pdev, 0);
397395
if (IS_ERR(base)) {
398396
pr_err("%s: failed to map clock registers\n", __func__);
399397
return PTR_ERR(base);

0 commit comments

Comments
 (0)