]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
soc/tegra: flowctrl: Use devm_platform_get_and_ioremap_resource()
authorYe Xingchen <ye.xingchen@zte.com.cn>
Wed, 15 Feb 2023 09:18:03 +0000 (17:18 +0800)
committerThierry Reding <treding@nvidia.com>
Wed, 5 Apr 2023 12:59:09 +0000 (14:59 +0200)
Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.

Signed-off-by: Ye Xingchen <ye.xingchen@zte.com.cn>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/soc/tegra/flowctrl.c

index 5db919d96aba5811f53cb94e532d57693e8374ec..221202db33130c47db456cd0fcfc29b0f7efb48b 100644 (file)
@@ -156,10 +156,8 @@ void flowctrl_cpu_suspend_exit(unsigned int cpuid)
 static int tegra_flowctrl_probe(struct platform_device *pdev)
 {
        void __iomem *base = tegra_flowctrl_base;
-       struct resource *res;
 
-       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       tegra_flowctrl_base = devm_ioremap_resource(&pdev->dev, res);
+       tegra_flowctrl_base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
        if (IS_ERR(tegra_flowctrl_base))
                return PTR_ERR(tegra_flowctrl_base);