Commit 3c5a5df9 authored by Yang Li's avatar Yang Li Committed by Thierry Reding

drm/tegra: dpaux: Use devm_platform_ioremap_resource()

Convert platform_get_resource(),devm_ioremap_resource() to a single
call to devm_platform_ioremap_resource(), as this is exactly what this
function does.
Signed-off-by: default avatarYang Li <yang.lee@linux.alibaba.com>
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230421084952.45275-1-yang.lee@linux.alibaba.com
parent b02e6e04
...@@ -447,7 +447,6 @@ static const struct pinmux_ops tegra_dpaux_pinmux_ops = { ...@@ -447,7 +447,6 @@ static const struct pinmux_ops tegra_dpaux_pinmux_ops = {
static int tegra_dpaux_probe(struct platform_device *pdev) static int tegra_dpaux_probe(struct platform_device *pdev)
{ {
struct tegra_dpaux *dpaux; struct tegra_dpaux *dpaux;
struct resource *regs;
u32 value; u32 value;
int err; int err;
...@@ -461,8 +460,7 @@ static int tegra_dpaux_probe(struct platform_device *pdev) ...@@ -461,8 +460,7 @@ static int tegra_dpaux_probe(struct platform_device *pdev)
INIT_LIST_HEAD(&dpaux->list); INIT_LIST_HEAD(&dpaux->list);
dpaux->dev = &pdev->dev; dpaux->dev = &pdev->dev;
regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); dpaux->regs = devm_platform_ioremap_resource(pdev, 0);
dpaux->regs = devm_ioremap_resource(&pdev->dev, regs);
if (IS_ERR(dpaux->regs)) if (IS_ERR(dpaux->regs))
return PTR_ERR(dpaux->regs); return PTR_ERR(dpaux->regs);
......
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