]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
soc/tegra: pmc: Use devm_platform_ioremap_resource()
authorCai Huoqing <caihuoqing@baidu.com>
Wed, 8 Sep 2021 07:17:24 +0000 (15:17 +0800)
committerThierry Reding <treding@nvidia.com>
Fri, 8 Oct 2021 19:42:41 +0000 (21:42 +0200)
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>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/soc/tegra/pmc.c

index 6695935a81f11d0faa4d09f28b96e64a76ccf146..575d6d5b42941b410e47d111b70a3d4a21ba82ff 100644 (file)
@@ -2816,8 +2816,7 @@ static int tegra_pmc_probe(struct platform_device *pdev)
                return err;
 
        /* take over the memory region from the early initialization */
-       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       base = devm_ioremap_resource(&pdev->dev, res);
+       base = devm_platform_ioremap_resource(pdev, 0);
        if (IS_ERR(base))
                return PTR_ERR(base);