Commit a858ac8f authored by Dmitry Osipenko's avatar Dmitry Osipenko Committed by Thierry Reding

drm/tegra: dc: Use devm_platform_ioremap_resource

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: default avatarDmitry Osipenko <digetx@gmail.com>
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
parent bb6d3fb3
...@@ -2503,7 +2503,6 @@ static int tegra_dc_couple(struct tegra_dc *dc) ...@@ -2503,7 +2503,6 @@ static int tegra_dc_couple(struct tegra_dc *dc)
static int tegra_dc_probe(struct platform_device *pdev) static int tegra_dc_probe(struct platform_device *pdev)
{ {
struct resource *regs;
struct tegra_dc *dc; struct tegra_dc *dc;
int err; int err;
...@@ -2560,8 +2559,7 @@ static int tegra_dc_probe(struct platform_device *pdev) ...@@ -2560,8 +2559,7 @@ static int tegra_dc_probe(struct platform_device *pdev)
tegra_powergate_power_off(dc->powergate); tegra_powergate_power_off(dc->powergate);
} }
regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); dc->regs = devm_platform_ioremap_resource(pdev, 0);
dc->regs = devm_ioremap_resource(&pdev->dev, regs);
if (IS_ERR(dc->regs)) if (IS_ERR(dc->regs))
return PTR_ERR(dc->regs); return PTR_ERR(dc->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