Commit ffa8aa00 authored by Paul Cercueil's avatar Paul Cercueil

DRM: ingenic: Use devm_platform_ioremap_resource

Simplify a bit the probe function by using the newly introduced
devm_platform_ioremap_resource(), instead of having to call
platform_get_resource() followed by devm_ioremap_resource().
Signed-off-by: default avatarPaul Cercueil <paul@crapouillou.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20190627182114.27299-1-paul@crapouillou.net
# *** extracted tags ***
Reviewed-by: default avatarSam Ravnborg <sam@ravnborg.org>
parent fdbdcc83
...@@ -580,7 +580,6 @@ static int ingenic_drm_probe(struct platform_device *pdev) ...@@ -580,7 +580,6 @@ static int ingenic_drm_probe(struct platform_device *pdev)
struct drm_bridge *bridge; struct drm_bridge *bridge;
struct drm_panel *panel; struct drm_panel *panel;
struct drm_device *drm; struct drm_device *drm;
struct resource *mem;
void __iomem *base; void __iomem *base;
long parent_rate; long parent_rate;
int ret, irq; int ret, irq;
...@@ -614,8 +613,7 @@ static int ingenic_drm_probe(struct platform_device *pdev) ...@@ -614,8 +613,7 @@ static int ingenic_drm_probe(struct platform_device *pdev)
drm->mode_config.max_height = 600; drm->mode_config.max_height = 600;
drm->mode_config.funcs = &ingenic_drm_mode_config_funcs; drm->mode_config.funcs = &ingenic_drm_mode_config_funcs;
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); base = devm_platform_ioremap_resource(pdev, 0);
base = devm_ioremap_resource(dev, mem);
if (IS_ERR(base)) { if (IS_ERR(base)) {
dev_err(dev, "Failed to get memory resource"); dev_err(dev, "Failed to get memory resource");
return PTR_ERR(base); return PTR_ERR(base);
......
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