* [PATCH] drm/tegra: dc: Use devm_platform_ioremap_resource() to simplify code
@ 2020-04-16 14:42 Tang Bin
0 siblings, 0 replies; only message in thread
From: Tang Bin @ 2020-04-16 14:42 UTC (permalink / raw)
To: thierry.reding, airlied, daniel, jonathanh
Cc: dri-devel, linux-tegra, linux-kernel, Tang Bin
Use devm_platform_ioremap_resource() instead of
platform_get_resource()+ devm_ioremap_resource().
Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
---
drivers/gpu/drm/tegra/dc.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c
index d26fb16d6..72c952b1a 100644
--- a/drivers/gpu/drm/tegra/dc.c
+++ b/drivers/gpu/drm/tegra/dc.c
@@ -2503,7 +2503,6 @@ static int tegra_dc_couple(struct tegra_dc *dc)
static int tegra_dc_probe(struct platform_device *pdev)
{
- struct resource *regs;
struct tegra_dc *dc;
int err;
@@ -2560,8 +2559,7 @@ static int tegra_dc_probe(struct platform_device *pdev)
tegra_powergate_power_off(dc->powergate);
}
- regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- dc->regs = devm_ioremap_resource(&pdev->dev, regs);
+ dc->regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(dc->regs))
return PTR_ERR(dc->regs);
--
2.20.1.windows.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-04-16 14:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-16 14:42 [PATCH] drm/tegra: dc: Use devm_platform_ioremap_resource() to simplify code Tang Bin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).