[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20210721023239.29284-1-tangbin@cmss.chinamobile.com>
Date: Wed, 21 Jul 2021 10:32:39 +0800
From: Tang Bin <tangbin@...s.chinamobile.com>
To: a.hajda@...sung.com, narmstrong@...libre.com,
Laurent.pinchart@...asonboard.com, jonas@...boo.se,
airlied@...ux.ie, daniel@...ll.ch
Cc: dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
Tang Bin <tangbin@...s.chinamobile.com>
Subject: [PATCH] drm/bridge/analogix/dp_core: Use devm_platform_ioremap_resource() to simplify code
Use devm_platform_ioremap_resource() instead of
platform_get_resource() & devm_ioremap_resource().
Signed-off-by: Tang Bin <tangbin@...s.chinamobile.com>
---
drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
index 76736fb8e..71537cf8c 100644
--- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
+++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
@@ -1656,7 +1656,6 @@ analogix_dp_probe(struct device *dev, struct analogix_dp_plat_data *plat_data)
{
struct platform_device *pdev = to_platform_device(dev);
struct analogix_dp_device *dp;
- struct resource *res;
unsigned int irq_flags;
int ret;
@@ -1710,9 +1709,7 @@ analogix_dp_probe(struct device *dev, struct analogix_dp_plat_data *plat_data)
clk_prepare_enable(dp->clock);
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-
- dp->reg_base = devm_ioremap_resource(&pdev->dev, res);
+ dp->reg_base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(dp->reg_base))
return ERR_CAST(dp->reg_base);
--
2.20.1.windows.1
Powered by blists - more mailing lists