[PATCH -next] drm/msm: Use devm_platform_ioremap_resource_byname()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



platform_get_resource_byname() and devm_ioremap_resource() can be
replaced by devm_platform_ioremap_resource_byname(), which can
simplify the code logic a bit, No functional change here.

Signed-off-by: Jinjie Ruan <ruanjinjie@xxxxxxxxxx>
---
 drivers/gpu/drm/msm/msm_io_utils.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/msm/msm_io_utils.c b/drivers/gpu/drm/msm/msm_io_utils.c
index afedd61c3e28..6f7933f01ae6 100644
--- a/drivers/gpu/drm/msm/msm_io_utils.c
+++ b/drivers/gpu/drm/msm/msm_io_utils.c
@@ -54,13 +54,7 @@ void __iomem *msm_ioremap_mdss(struct platform_device *mdss_pdev,
 			       struct platform_device *pdev,
 			       const char *name)
 {
-	struct resource *res;
-
-	res = platform_get_resource_byname(mdss_pdev, IORESOURCE_MEM, name);
-	if (!res)
-		return ERR_PTR(-EINVAL);
-
-	return devm_ioremap_resource(&pdev->dev, res);
+	return devm_platform_ioremap_resource_byname(mdss_pdev, name);
 }
 
 static void __iomem *_msm_ioremap(struct platform_device *pdev, const char *name,
-- 
2.34.1




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux