[PATCH] drm/mediatek: Convert to use devm_platform_ioremap_resource

CK Hu (胡俊光) ck.hu at mediatek.com
Fri Feb 7 02:26:41 UTC 2025


Hi, Shixiong:

On Tue, 2025-01-28 at 17:41 +0800, oushixiong1025 at 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 at kylinos.cn>
> 
> Do not need to get resource, so convert to use
> devm_platform_ioremap_resource.

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

> 
> Signed-off-by: Shixiong Ou <oushixiong at 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
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20250207/b647f4d1/attachment-0001.htm>


More information about the dri-devel mailing list