mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drm/mediatek: Convert to use devm_platform_ioremap_resource
@ 2025-01-28  9:41 oushixiong1025
  2025-02-07  2:26 ` CK Hu (胡俊光)
  0 siblings, 1 reply; 2+ messages in thread
From: oushixiong1025 @ 2025-01-28  9:41 UTC (permalink / raw)
  To: Chun-Kuang Hu
  Cc: Philipp Zabel, David Airlie, Simona Vetter, Matthias Brugger,
	AngeloGioacchino Del Regno, dri-devel, linux-mediatek,
	linux-kernel, linux-arm-kernel, Shixiong Ou

From: Shixiong Ou <oushixiong@kylinos.cn>

Do not need to get resource, so convert to use
devm_platform_ioremap_resource.

Signed-off-by: Shixiong Ou <oushixiong@kylinos.cn>
---
 drivers/gpu/drm/mediatek/mtk_padding.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/mediatek/mtk_padding.c b/drivers/gpu/drm/mediatek/mtk_padding.c
index b4e3e5a3428b..7e302724e74a 100644
--- a/drivers/gpu/drm/mediatek/mtk_padding.c
+++ b/drivers/gpu/drm/mediatek/mtk_padding.c
@@ -95,7 +95,6 @@ static int mtk_padding_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct mtk_padding *priv;
-	struct resource *res;
 	int ret;
 
 	priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
@@ -107,7 +106,7 @@ static int mtk_padding_probe(struct platform_device *pdev)
 		return dev_err_probe(dev, PTR_ERR(priv->clk),
 				     "failed to get clk\n");
 
-	priv->reg = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
+	priv->reg = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(priv->reg))
 		return dev_err_probe(dev, PTR_ERR(priv->reg),
 				     "failed to do ioremap\n");
-- 
2.43.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm/mediatek: Convert to use devm_platform_ioremap_resource
  2025-01-28  9:41 [PATCH] drm/mediatek: Convert to use devm_platform_ioremap_resource oushixiong1025
@ 2025-02-07  2:26 ` CK Hu (胡俊光)
  0 siblings, 0 replies; 2+ messages in thread
From: CK Hu (胡俊光) @ 2025-02-07  2:26 UTC (permalink / raw)
  To: oushixiong1025, chunkuang.hu
  Cc: simona, dri-devel, AngeloGioacchino Del Regno, linux-kernel,
	airlied, linux-arm-kernel, p.zabel, matthias.bgg, linux-mediatek,
	oushixiong

Hi, Shixiong:

On Tue, 2025-01-28 at 17:41 +0800, oushixiong1025@163.com wrote:
> External email : Please do not click links or open attachments until you have verified the sender or the content.
> 
> 
> From: Shixiong Ou <oushixiong@kylinos.cn>
> 
> Do not need to get resource, so convert to use
> devm_platform_ioremap_resource.

Reviewed-by: CK Hu <ck.hu@mediatek.com>

> 
> Signed-off-by: Shixiong Ou <oushixiong@kylinos.cn>
> ---
>  drivers/gpu/drm/mediatek/mtk_padding.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/mediatek/mtk_padding.c b/drivers/gpu/drm/mediatek/mtk_padding.c
> index b4e3e5a3428b..7e302724e74a 100644
> --- a/drivers/gpu/drm/mediatek/mtk_padding.c
> +++ b/drivers/gpu/drm/mediatek/mtk_padding.c
> @@ -95,7 +95,6 @@ static int mtk_padding_probe(struct platform_device *pdev)
>  {
>         struct device *dev = &pdev->dev;
>         struct mtk_padding *priv;
> -       struct resource *res;
>         int ret;
> 
>         priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
> @@ -107,7 +106,7 @@ static int mtk_padding_probe(struct platform_device *pdev)
>                 return dev_err_probe(dev, PTR_ERR(priv->clk),
>                                      "failed to get clk\n");
> 
> -       priv->reg = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
> +       priv->reg = devm_platform_ioremap_resource(pdev, 0);
>         if (IS_ERR(priv->reg))
>                 return dev_err_probe(dev, PTR_ERR(priv->reg),
>                                      "failed to do ioremap\n");
> --
> 2.43.0
> 
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-02-07  2:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-28  9:41 [PATCH] drm/mediatek: Convert to use devm_platform_ioremap_resource oushixiong1025
2025-02-07  2:26 ` CK Hu (胡俊光)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®