]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/tegra: dc: Use devm_platform_ioremap_resource
authorDmitry Osipenko <digetx@gmail.com>
Sun, 8 Mar 2020 22:38:07 +0000 (01:38 +0300)
committerThierry Reding <treding@nvidia.com>
Thu, 12 Mar 2020 09:26:02 +0000 (10:26 +0100)
The devm_platform_ioremap_resource() helper replaces few lines of a
boilerplate code with a single line, making code to look cleaner a tad.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/gpu/drm/tegra/dc.c

index 7c70fd31a4c248ab495a9f130c36d5bd2cc7865f..257163dda30173c6105579477d9a3805b33efcde 100644 (file)
@@ -2503,7 +2503,6 @@ static int tegra_dc_couple(struct tegra_dc *dc)
 
 static int tegra_dc_probe(struct platform_device *pdev)
 {
-       struct resource *regs;
        struct tegra_dc *dc;
        int err;
 
@@ -2560,8 +2559,7 @@ static int tegra_dc_probe(struct platform_device *pdev)
                tegra_powergate_power_off(dc->powergate);
        }
 
-       regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       dc->regs = devm_ioremap_resource(&pdev->dev, regs);
+       dc->regs = devm_platform_ioremap_resource(pdev, 0);
        if (IS_ERR(dc->regs))
                return PTR_ERR(dc->regs);