[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240828084929.2527228-1-ruanjinjie@huawei.com>
Date: Wed, 28 Aug 2024 16:49:29 +0800
From: Jinjie Ruan <ruanjinjie@...wei.com>
To: <laurent.pinchart@...asonboard.com>, <tomi.valkeinen@...asonboard.com>,
<maarten.lankhorst@...ux.intel.com>, <mripard@...nel.org>,
<tzimmermann@...e.de>, <airlied@...il.com>, <daniel@...ll.ch>,
<michal.simek@....com>, <dri-devel@...ts.freedesktop.org>,
<linux-arm-kernel@...ts.infradead.org>, <linux-kernel@...r.kernel.org>
CC: <ruanjinjie@...wei.com>
Subject: [PATCH -next] drm: zynqmp_dp: Use devm_platform_ioremap_resource_byname()
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@...wei.com>
---
drivers/gpu/drm/xlnx/zynqmp_dp.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/xlnx/zynqmp_dp.c b/drivers/gpu/drm/xlnx/zynqmp_dp.c
index 129beac4c073..4eb19ac95bdb 100644
--- a/drivers/gpu/drm/xlnx/zynqmp_dp.c
+++ b/drivers/gpu/drm/xlnx/zynqmp_dp.c
@@ -1715,7 +1715,6 @@ int zynqmp_dp_probe(struct zynqmp_dpsub *dpsub)
struct platform_device *pdev = to_platform_device(dpsub->dev);
struct drm_bridge *bridge;
struct zynqmp_dp *dp;
- struct resource *res;
int ret;
dp = kzalloc(sizeof(*dp), GFP_KERNEL);
@@ -1729,8 +1728,7 @@ int zynqmp_dp_probe(struct zynqmp_dpsub *dpsub)
INIT_WORK(&dp->hpd_work, zynqmp_dp_hpd_work_func);
/* Acquire all resources (IOMEM, IRQ and PHYs). */
- res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "dp");
- dp->iomem = devm_ioremap_resource(dp->dev, res);
+ dp->iomem = devm_platform_ioremap_resource_byname(pdev, "dp");
if (IS_ERR(dp->iomem)) {
ret = PTR_ERR(dp->iomem);
goto err_free;
--
2.34.1
Powered by blists - more mailing lists