summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/tidss
diff options
context:
space:
mode:
authorWang Xiaojun <wangxiaojun11@huawei.com>2020-09-17 14:29:58 +0800
committerTomi Valkeinen <tomi.valkeinen@ti.com>2020-11-10 14:34:16 +0200
commit3945ac0ea8ca213e09e6d62c0ce14f3b3941ad2c (patch)
treed078b08489efc086ca52d180730ac2bcc9e64cf4 /drivers/gpu/drm/tidss
parentae36fcccfaf5f3666beb3cf30aea9127b926ab64 (diff)
drm/tidss: use 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: Wang Xiaojun <wangxiaojun11@huawei.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200917062958.2183496-1-wangxiaojun11@huawei.com
Diffstat (limited to 'drivers/gpu/drm/tidss')
-rw-r--r--drivers/gpu/drm/tidss/tidss_dispc.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/gpu/drm/tidss/tidss_dispc.c b/drivers/gpu/drm/tidss/tidss_dispc.c
index b669168ae7cb..60b92df615aa 100644
--- a/drivers/gpu/drm/tidss/tidss_dispc.c
+++ b/drivers/gpu/drm/tidss/tidss_dispc.c
@@ -2608,16 +2608,9 @@ void dispc_remove(struct tidss_device *tidss)
static int dispc_iomap_resource(struct platform_device *pdev, const char *name,
void __iomem **base)
{
- struct resource *res;
void __iomem *b;
- res = platform_get_resource_byname(pdev, IORESOURCE_MEM, name);
- if (!res) {
- dev_err(&pdev->dev, "cannot get mem resource '%s'\n", name);
- return -EINVAL;
- }
-
- b = devm_ioremap_resource(&pdev->dev, res);
+ b = devm_platform_ioremap_resource_byname(pdev, name);
if (IS_ERR(b)) {
dev_err(&pdev->dev, "cannot ioremap resource '%s'\n", name);
return PTR_ERR(b);