All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yangtao Li <frank.li@vivo.com>
To: Xinliang Liu <xinliang.liu@linaro.org>,
	Tian Tao <tiantao6@hisilicon.com>,
	Xinwei Kong <kong.kongxinwei@hisilicon.com>,
	Sumit Semwal <sumit.semwal@linaro.org>,
	Yongqin Liu <yongqin.liu@linaro.org>,
	John Stultz <jstultz@google.com>,
	David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>
Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	Yangtao Li <frank.li@vivo.com>
Subject: [PATCH v2 09/19] drm/hisilicon: Convert to devm_platform_ioremap_resource()
Date: Mon, 10 Jul 2023 11:23:45 +0800	[thread overview]
Message-ID: <20230710032355.72914-9-frank.li@vivo.com> (raw)
In-Reply-To: <20230710032355.72914-1-frank.li@vivo.com>

Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c b/drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c
index d9978b79828c..ff4ed4639509 100644
--- a/drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c
+++ b/drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c
@@ -826,7 +826,6 @@ static const struct component_ops dsi_ops = {
 static int dsi_parse_dt(struct platform_device *pdev, struct dw_dsi *dsi)
 {
 	struct dsi_hw_ctx *ctx = dsi->ctx;
-	struct resource *res;
 
 	ctx->pclk = devm_clk_get(&pdev->dev, "pclk");
 	if (IS_ERR(ctx->pclk)) {
@@ -834,8 +833,7 @@ static int dsi_parse_dt(struct platform_device *pdev, struct dw_dsi *dsi)
 		return PTR_ERR(ctx->pclk);
 	}
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	ctx->base = devm_ioremap_resource(&pdev->dev, res);
+	ctx->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(ctx->base)) {
 		DRM_ERROR("failed to remap dsi io region\n");
 		return PTR_ERR(ctx->base);
-- 
2.39.0


WARNING: multiple messages have this Message-ID (diff)
From: Yangtao Li <frank.li@vivo.com>
To: Xinliang Liu <xinliang.liu@linaro.org>,
	Tian Tao <tiantao6@hisilicon.com>,
	Xinwei Kong <kong.kongxinwei@hisilicon.com>,
	Sumit Semwal <sumit.semwal@linaro.org>,
	Yongqin Liu <yongqin.liu@linaro.org>,
	John Stultz <jstultz@google.com>,
	David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>
Cc: Yangtao Li <frank.li@vivo.com>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 09/19] drm/hisilicon: Convert to devm_platform_ioremap_resource()
Date: Mon, 10 Jul 2023 11:23:45 +0800	[thread overview]
Message-ID: <20230710032355.72914-9-frank.li@vivo.com> (raw)
In-Reply-To: <20230710032355.72914-1-frank.li@vivo.com>

Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c b/drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c
index d9978b79828c..ff4ed4639509 100644
--- a/drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c
+++ b/drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c
@@ -826,7 +826,6 @@ static const struct component_ops dsi_ops = {
 static int dsi_parse_dt(struct platform_device *pdev, struct dw_dsi *dsi)
 {
 	struct dsi_hw_ctx *ctx = dsi->ctx;
-	struct resource *res;
 
 	ctx->pclk = devm_clk_get(&pdev->dev, "pclk");
 	if (IS_ERR(ctx->pclk)) {
@@ -834,8 +833,7 @@ static int dsi_parse_dt(struct platform_device *pdev, struct dw_dsi *dsi)
 		return PTR_ERR(ctx->pclk);
 	}
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	ctx->base = devm_ioremap_resource(&pdev->dev, res);
+	ctx->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(ctx->base)) {
 		DRM_ERROR("failed to remap dsi io region\n");
 		return PTR_ERR(ctx->base);
-- 
2.39.0


  parent reply	other threads:[~2023-07-10  3:24 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-10  3:23 [PATCH v2 01/19] drm/renesas: Convert to devm_platform_ioremap_resource() Yangtao Li
2023-07-10  3:23 ` Yangtao Li
2023-07-10  3:23 ` [PATCH v2 02/19] gpu: ipu-v3: pre: " Yangtao Li
2023-07-10  3:23   ` Yangtao Li
2023-07-28 15:30   ` Philipp Zabel
2023-07-28 15:30     ` Philipp Zabel
2023-07-10  3:23 ` [PATCH v2 03/19] drm/rockchip: dsi: Use devm_platform_get_and_ioremap_resource() Yangtao Li
2023-07-10  3:23   ` Yangtao Li
2023-07-10  3:23   ` Yangtao Li
2023-07-10  3:23   ` Yangtao Li
2023-07-10  3:23 ` [PATCH v2 04/19] drm: kirin: Convert to devm_platform_ioremap_resource() Yangtao Li
2023-07-10  3:23   ` Yangtao Li
2023-07-10  3:23 ` [PATCH v2 05/19] drm/tegra: hdmi: " Yangtao Li
2023-07-10  3:23   ` Yangtao Li
2023-07-10  3:23 ` [PATCH v2 06/19] drm: bridge: dw_hdmi: Use devm_platform_get_and_ioremap_resource() Yangtao Li
2023-07-10  3:23   ` Yangtao Li
2023-07-10  3:23 ` [PATCH v2 07/19] drm/bridge: analogix_dp: Convert to devm_platform_ioremap_resource() Yangtao Li
2023-07-10  3:23   ` Yangtao Li
2023-07-10  3:23 ` [PATCH v2 08/19] gpu: ipu-v3: prg: " Yangtao Li
2023-07-10  3:23   ` Yangtao Li
2023-07-28 15:30   ` Philipp Zabel
2023-07-28 15:30     ` Philipp Zabel
2023-07-10  3:23 ` Yangtao Li [this message]
2023-07-10  3:23   ` [PATCH v2 09/19] drm/hisilicon: " Yangtao Li
2023-07-10  3:23 ` [PATCH v2 10/19] drm: lcdif: " Yangtao Li
2023-07-10  3:23   ` Yangtao Li
2023-07-10  3:23   ` Yangtao Li
2023-07-10  3:23 ` [PATCH v2 11/19] drm/mxsfb: " Yangtao Li
2023-07-10  3:23   ` Yangtao Li
2023-07-10  3:23   ` Yangtao Li
2023-07-10  3:23 ` [PATCH v2 12/19] drm/tegra: dpaux: " Yangtao Li
2023-07-10  3:23   ` Yangtao Li
2023-07-10  3:23 ` [PATCH v2 13/19] drm/tegra: dpaux: Fix incorrect return value of platform_get_irq Yangtao Li
2023-07-10  3:23   ` Yangtao Li
2023-07-10  3:23 ` [PATCH v2 14/19] drm/stm: ltdc: Convert to devm_platform_ioremap_resource() Yangtao Li
2023-07-10  3:23   ` Yangtao Li
2023-07-10  3:23   ` Yangtao Li
2023-07-10  3:23 ` [PATCH v2 15/19] drm/aspeed: " Yangtao Li
2023-07-10  3:23   ` Yangtao Li
2023-07-10  3:23   ` Yangtao Li
2023-07-10  3:23 ` [PATCH v2 16/19] drm/tegra: sor: " Yangtao Li
2023-07-10  3:23   ` Yangtao Li
2023-07-10  3:23 ` [PATCH v2 17/19] drm/rockchip: vop: Use devm_platform_get_and_ioremap_resource() Yangtao Li
2023-07-10  3:23   ` Yangtao Li
2023-07-10  3:23   ` Yangtao Li
2023-07-10  3:23   ` Yangtao Li
2023-07-10  3:23 ` [PATCH v2 18/19] drm/arcpgu: Convert to devm_platform_ioremap_resource() Yangtao Li
2023-07-10  3:23   ` Yangtao Li
2023-07-10  3:23 ` [PATCH v2 19/19] drm/fsl-dcu: " Yangtao Li
2023-07-10  3:23   ` Yangtao Li
2023-07-10 12:11 ` [PATCH v2 01/19] drm/renesas: " Geert Uytterhoeven
2023-07-10 12:11   ` Geert Uytterhoeven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230710032355.72914-9-frank.li@vivo.com \
    --to=frank.li@vivo.com \
    --cc=airlied@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jstultz@google.com \
    --cc=kong.kongxinwei@hisilicon.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sumit.semwal@linaro.org \
    --cc=tiantao6@hisilicon.com \
    --cc=xinliang.liu@linaro.org \
    --cc=yongqin.liu@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.