LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] drm/bridge/analogix/dp_core: Use devm_platform_ioremap_resource() to simplify code
@ 2021-07-21  2:32 Tang Bin
  0 siblings, 0 replies; only message in thread
From: Tang Bin @ 2021-07-21  2:32 UTC (permalink / raw)
  To: a.hajda, narmstrong, Laurent.pinchart, jonas, airlied, daniel
  Cc: dri-devel, linux-kernel, Tang Bin

Use devm_platform_ioremap_resource() instead of
platform_get_resource() & devm_ioremap_resource().

Signed-off-by: Tang Bin <tangbin@cmss.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




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-07-21  2:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-21  2:32 [PATCH] drm/bridge/analogix/dp_core: Use devm_platform_ioremap_resource() to simplify code Tang Bin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).