[PATCH] drm/mediatek: Convert to use devm_platform_ioremap_resource

oushixiong1025 at 163.com oushixiong1025 at 163.com
Tue Jan 28 09:41:18 UTC 2025


From: Shixiong Ou <oushixiong at kylinos.cn>

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

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



More information about the dri-devel mailing list