diff options
author | Yangtao Li <frank.li@vivo.com> | 2023-07-10 06:23:52 +0300 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2023-07-27 19:41:59 +0300 |
commit | 2f6b3f0b10afca77fc7b3850cdccde1958f51b63 (patch) | |
tree | 9473f275ccb3356eb1c0b9074922713546274d22 /drivers/gpu | |
parent | faae5646c13f4697fd2ba29b10e38f9be5aa890a (diff) | |
download | linux-2f6b3f0b10afca77fc7b3850cdccde1958f51b63.tar.xz |
drm/tegra: sor: Convert to devm_platform_ioremap_resource()
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
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/tegra/sor.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c index 93471b70e180..61b437a84806 100644 --- a/drivers/gpu/drm/tegra/sor.c +++ b/drivers/gpu/drm/tegra/sor.c @@ -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; |