clk: axm5516: Convert to devm_platform_ioremap_resource()
authorYangtao Li <frank.li@vivo.com>
Wed, 5 Jul 2023 06:53:03 +0000 (14:53 +0800)
committerStephen Boyd <sboyd@kernel.org>
Tue, 22 Aug 2023 21:28:05 +0000 (14:28 -0700)
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-3-frank.li@vivo.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/clk-axm5516.c

index 1afcfdf2e6f99cd5dbf8fade10011f8606df66c5..4a3462ee8f3edd203c20d330914a6f29bcb0f79b 100644 (file)
@@ -541,14 +541,12 @@ MODULE_DEVICE_TABLE(of, axmclk_match_table);
 static int axmclk_probe(struct platform_device *pdev)
 {
        void __iomem *base;
-       struct resource *res;
        int i, ret;
        struct device *dev = &pdev->dev;
        struct regmap *regmap;
        size_t 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);