]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/tegra: sor: Convert to devm_platform_ioremap_resource()
authorYangtao Li <frank.li@vivo.com>
Mon, 10 Jul 2023 03:23:52 +0000 (11:23 +0800)
committerThierry Reding <treding@nvidia.com>
Thu, 27 Jul 2023 16:41:59 +0000 (18:41 +0200)
Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230710032355.72914-16-frank.li@vivo.com
drivers/gpu/drm/tegra/sor.c

index 93471b70e18066cb2bdf562ee77ed624ea556695..61b437a84806edab1c449118ac921fd14f1ce8df 100644 (file)
@@ -3708,7 +3708,6 @@ static int tegra_sor_probe(struct platform_device *pdev)
 {
        struct device_node *np;
        struct tegra_sor *sor;
-       struct resource *regs;
        int err;
 
        sor = devm_kzalloc(&pdev->dev, sizeof(*sor), GFP_KERNEL);
@@ -3781,8 +3780,7 @@ static int tegra_sor_probe(struct platform_device *pdev)
                }
        }
 
-       regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       sor->regs = devm_ioremap_resource(&pdev->dev, regs);
+       sor->regs = devm_platform_ioremap_resource(pdev, 0);
        if (IS_ERR(sor->regs)) {
                err = PTR_ERR(sor->regs);
                goto remove;