Skip to content

Commit a858ac8

Browse files
digetxthierryreding
authored andcommitted
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: Dmitry Osipenko <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
1 parent bb6d3fb commit a858ac8

File tree

1 file changed

+1
-3
lines changed
  • drivers/gpu/drm/tegra

1 file changed

+1
-3
lines changed

drivers/gpu/drm/tegra/dc.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2503,7 +2503,6 @@ static int tegra_dc_couple(struct tegra_dc *dc)
25032503

25042504
static int tegra_dc_probe(struct platform_device *pdev)
25052505
{
2506-
struct resource *regs;
25072506
struct tegra_dc *dc;
25082507
int err;
25092508

@@ -2560,8 +2559,7 @@ static int tegra_dc_probe(struct platform_device *pdev)
25602559
tegra_powergate_power_off(dc->powergate);
25612560
}
25622561

2563-
regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
2564-
dc->regs = devm_ioremap_resource(&pdev->dev, regs);
2562+
dc->regs = devm_platform_ioremap_resource(pdev, 0);
25652563
if (IS_ERR(dc->regs))
25662564
return PTR_ERR(dc->regs);
25672565

0 commit comments

Comments
 (0)