Commit c3c7d70b authored by Cai Huoqing's avatar Cai Huoqing Committed by Melissa Wen

drm/v3d: Make use of the helper function devm_platform_ioremap_resource_byname()

Use the devm_platform_ioremap_resource_byname() helper instead of
calling platform_get_resource_byname() and devm_ioremap_resource()
separately
Signed-off-by: default avatarCai Huoqing <caihuoqing@baidu.com>
Reviewed-by: default avatarMelissa Wen <mwen@igalia.com>
Signed-off-by: default avatarMelissa Wen <melissa.srw@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210901112941.31320-1-caihuoqing@baidu.com
parent f3bc07eb
...@@ -206,10 +206,7 @@ MODULE_DEVICE_TABLE(of, v3d_of_match); ...@@ -206,10 +206,7 @@ MODULE_DEVICE_TABLE(of, v3d_of_match);
static int static int
map_regs(struct v3d_dev *v3d, void __iomem **regs, const char *name) map_regs(struct v3d_dev *v3d, void __iomem **regs, const char *name)
{ {
struct resource *res = *regs = devm_platform_ioremap_resource_byname(v3d_to_pdev(v3d), name);
platform_get_resource_byname(v3d_to_pdev(v3d), IORESOURCE_MEM, name);
*regs = devm_ioremap_resource(v3d->drm.dev, res);
return PTR_ERR_OR_ZERO(*regs); return PTR_ERR_OR_ZERO(*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