Skip to content

Commit

Permalink
drm/v3d: Make use of the helper function devm_platform_ioremap_resour…
Browse files Browse the repository at this point in the history
…ce_byname()

Use the devm_platform_ioremap_resource_byname() helper instead of
calling platform_get_resource_byname() and devm_ioremap_resource()
separately

Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
Reviewed-by: Melissa Wen <mwen@igalia.com>
Signed-off-by: Melissa Wen <melissa.srw@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210901112941.31320-1-caihuoqing@baidu.com
  • Loading branch information
Cai Huoqing authored and Melissa Wen committed Sep 20, 2021
1 parent f3bc07e commit c3c7d70
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/gpu/drm/v3d/v3d_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,7 @@ MODULE_DEVICE_TABLE(of, v3d_of_match);
static int
map_regs(struct v3d_dev *v3d, void __iomem **regs, const char *name)
{
struct resource *res =
platform_get_resource_byname(v3d_to_pdev(v3d), IORESOURCE_MEM, name);

*regs = devm_ioremap_resource(v3d->drm.dev, res);
*regs = devm_platform_ioremap_resource_byname(v3d_to_pdev(v3d), name);
return PTR_ERR_OR_ZERO(*regs);
}

Expand Down

0 comments on commit c3c7d70

Please sign in to comment.