mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH -next] drm/tve200: Use devm_platform_ioremap_resource()
@ 2023-04-21  9:13 Yang Li
  2023-04-24  8:05 ` Linus Walleij
  0 siblings, 1 reply; 2+ messages in thread
From: Yang Li @ 2023-04-21  9:13 UTC (permalink / raw)
  To: linus.walleij; +Cc: airlied, daniel, dri-devel, linux-kernel, Yang Li

Convert platform_get_resource(),devm_ioremap_resource() to a single
call to devm_platform_ioremap_resource(), as this is exactly what this
function does.

Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
 drivers/gpu/drm/tve200/tve200_drv.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/tve200/tve200_drv.c b/drivers/gpu/drm/tve200/tve200_drv.c
index abd557332b28..40b1168ad671 100644
--- a/drivers/gpu/drm/tve200/tve200_drv.c
+++ b/drivers/gpu/drm/tve200/tve200_drv.c
@@ -156,7 +156,6 @@ static int tve200_probe(struct platform_device *pdev)
 	struct device *dev = &pdev->dev;
 	struct tve200_drm_dev_private *priv;
 	struct drm_device *drm;
-	struct resource *res;
 	int irq;
 	int ret;
 
@@ -192,8 +191,7 @@ static int tve200_probe(struct platform_device *pdev)
 		goto clk_disable;
 	}
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	priv->regs = devm_ioremap_resource(dev, res);
+	priv->regs = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(priv->regs)) {
 		dev_err(dev, "%s failed mmio\n", __func__);
 		ret = -EINVAL;
-- 
2.20.1.7.g153144c


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

* Re: [PATCH -next] drm/tve200: Use devm_platform_ioremap_resource()
  2023-04-21  9:13 [PATCH -next] drm/tve200: Use devm_platform_ioremap_resource() Yang Li
@ 2023-04-24  8:05 ` Linus Walleij
  0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2023-04-24  8:05 UTC (permalink / raw)
  To: Yang Li; +Cc: airlied, daniel, dri-devel, linux-kernel

On Fri, Apr 21, 2023 at 11:13 AM Yang Li <yang.lee@linux.alibaba.com> wrote:

> Convert platform_get_resource(),devm_ioremap_resource() to a single
> call to devm_platform_ioremap_resource(), as this is exactly what this
> function does.
>
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>

That's a nice optimization.
Patch applied!

Yours,
Linus Walleij

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

end of thread, other threads:[~2023-04-24  8:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-21  9:13 [PATCH -next] drm/tve200: Use devm_platform_ioremap_resource() Yang Li
2023-04-24  8:05 ` Linus Walleij

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®