[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ywsnnvdm7ju6gkjxa6qevhry5vzdixnmyvvxhyoxs5anxyks3m@s4tab36srpmg>
Date: Sun, 26 Jan 2025 17:37:11 +0100
From: Maxime Ripard <mripard@...nel.org>
To: oushixiong1025@....com
Cc: Andrzej Hajda <andrzej.hajda@...el.com>,
Neil Armstrong <neil.armstrong@...aro.org>, Robert Foss <rfoss@...nel.org>,
Laurent Pinchart <Laurent.pinchart@...asonboard.com>, Jonas Karlman <jonas@...boo.se>,
Jernej Skrabec <jernej.skrabec@...il.com>, Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Thomas Zimmermann <tzimmermann@...e.de>, David Airlie <airlied@...il.com>,
Simona Vetter <simona@...ll.ch>, dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
Shixiong Ou <oushixiong@...inos.cn>
Subject: Re: [PATCH v2] drm/bridge: Use
devm_platform_get_and_ioremap_resource()
On Wed, Jan 22, 2025 at 10:56:00AM +0800, oushixiong1025@....com wrote:
> From: Shixiong Ou <oushixiong@...inos.cn>
>
> Convert platform_get_resource(), devm_ioremap_resource() to a single call to
> devm_platform_get_and_ioremap_resource().
>
> Signed-off-by: Shixiong Ou <oushixiong@...inos.cn>
> ---
> V1 -> V2: Add Missing commit message.
>
> drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 4 +---
> drivers/gpu/drm/bridge/microchip-lvds.c | 5 ++---
> drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 3 +--
> 3 files changed, 4 insertions(+), 8 deletions(-)
Please split it into one patch per driver.
> diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> index bfa88409a7ff..284fd186eb5f 100644
> --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> @@ -1605,9 +1605,7 @@ analogix_dp_probe(struct device *dev, struct analogix_dp_plat_data *plat_data)
> return ERR_CAST(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, &res);
Why do we need to use devm_platform_get_and_ioremap_resource() over
devm_platform_ioremap_resource()?
Maxime
Download attachment "signature.asc" of type "application/pgp-signature" (274 bytes)
Powered by blists - more mailing lists