summaryrefslogtreecommitdiff
path: root/drivers/clk
diff options
context:
space:
mode:
authorYangtao Li <frank.li@vivo.com>2023-07-05 09:53:11 +0300
committerStephen Boyd <sboyd@kernel.org>2023-08-23 00:28:34 +0300
commit90f79ac5bf67ce5a347a0c5fe2b2d87618c306a9 (patch)
tree1fcab6281e71414288553934ec5bd752af7e4c96 /drivers/clk
parent183a1f1b237cf3006a702214410204287c8500a0 (diff)
downloadlinux-90f79ac5bf67ce5a347a0c5fe2b2d87618c306a9.tar.xz
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>
Diffstat (limited to 'drivers/clk')
-rw-r--r--drivers/clk/socfpga/clk-agilex.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/clk/socfpga/clk-agilex.c b/drivers/clk/socfpga/clk-agilex.c
index 5c972e4ffa17..6b65a74aefa6 100644
--- a/drivers/clk/socfpga/clk-agilex.c
+++ b/drivers/clk/socfpga/clk-agilex.c
@@ -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);