From: <ye.xingchen@zte.com.cn>
To: <dianders@chromium.org>
Cc: <andrzej.hajda@intel.com>, <neil.armstrong@linaro.org>,
<rfoss@kernel.org>, <laurent.pinchart@ideasonboard.com>,
<jonas@kwiboo.se>, <jernej.skrabec@gmail.com>,
<airlied@gmail.com>, <daniel@ffwll.ch>,
<briannorris@chromium.org>, <ville.syrjala@linux.intel.com>,
<sam@ravnborg.org>, <linmq006@gmail.com>, <maxime@cerno.tech>,
<dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>
Subject: [PATCH] drm: bridge: Use devm_platform_get_and_ioremap_resource()
Date: Thu, 19 Jan 2023 15:59:01 +0800 (CST) [thread overview]
Message-ID: <202301191559014087173@zte.com.cn> (raw)
From: ye xingchen <ye.xingchen@zte.com.cn>
Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
---
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 df9370e0ff23..50f092b316d0 100644
--- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
+++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
@@ -1686,7 +1686,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;
@@ -1740,9 +1739,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_get_and_ioremap_resource(pdev, 0, NULL);
if (IS_ERR(dp->reg_base)) {
ret = PTR_ERR(dp->reg_base);
goto err_disable_clk;
--
2.25.1
next reply other threads:[~2023-01-19 7:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-19 7:59 ye.xingchen [this message]
2023-01-19 17:56 ` [PATCH] drm: bridge: Use devm_platform_get_and_ioremap_resource() Brian Norris
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=202301191559014087173@zte.com.cn \
--to=ye.xingchen@zte.com.cn \
--cc=airlied@gmail.com \
--cc=andrzej.hajda@intel.com \
--cc=briannorris@chromium.org \
--cc=daniel@ffwll.ch \
--cc=dianders@chromium.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jernej.skrabec@gmail.com \
--cc=jonas@kwiboo.se \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linmq006@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maxime@cerno.tech \
--cc=neil.armstrong@linaro.org \
--cc=rfoss@kernel.org \
--cc=sam@ravnborg.org \
--cc=ville.syrjala@linux.intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox