Commit 2f6b3f0b authored by Yangtao Li's avatar Yangtao Li Committed by Thierry Reding

drm/tegra: sor: Convert to devm_platform_ioremap_resource()

Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: default avatarYangtao Li <frank.li@vivo.com>
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230710032355.72914-16-frank.li@vivo.com
parent faae5646
...@@ -3708,7 +3708,6 @@ static int tegra_sor_probe(struct platform_device *pdev) ...@@ -3708,7 +3708,6 @@ static int tegra_sor_probe(struct platform_device *pdev)
{ {
struct device_node *np; struct device_node *np;
struct tegra_sor *sor; struct tegra_sor *sor;
struct resource *regs;
int err; int err;
sor = devm_kzalloc(&pdev->dev, sizeof(*sor), GFP_KERNEL); sor = devm_kzalloc(&pdev->dev, sizeof(*sor), GFP_KERNEL);
...@@ -3781,8 +3780,7 @@ static int tegra_sor_probe(struct platform_device *pdev) ...@@ -3781,8 +3780,7 @@ static int tegra_sor_probe(struct platform_device *pdev)
} }
} }
regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); sor->regs = devm_platform_ioremap_resource(pdev, 0);
sor->regs = devm_ioremap_resource(&pdev->dev, regs);
if (IS_ERR(sor->regs)) { if (IS_ERR(sor->regs)) {
err = PTR_ERR(sor->regs); err = PTR_ERR(sor->regs);
goto remove; goto remove;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment