From: Yangtao Li Date: Mon, 10 Jul 2023 03:23:38 +0000 (+0800) Subject: gpu: ipu-v3: pre: Convert to devm_platform_ioremap_resource() X-Git-Tag: v6.6.17~3937^2~18^2~86 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=989350887f6ca642489e7de4675dc855b48ebb92;p=platform%2Fkernel%2Flinux-rpi.git gpu: ipu-v3: pre: Convert to devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Reviewed-by: Philipp Zabel Link: https://lore.kernel.org/r/20230710032355.72914-2-frank.li@vivo.com Signed-off-by: Philipp Zabel Link: https://patchwork.freedesktop.org/patch/msgid/20230710032355.72914-2-frank.li@vivo.com --- diff --git a/drivers/gpu/ipu-v3/ipu-pre.c b/drivers/gpu/ipu-v3/ipu-pre.c index ad82c9e0252f..aef984a43190 100644 --- a/drivers/gpu/ipu-v3/ipu-pre.c +++ b/drivers/gpu/ipu-v3/ipu-pre.c @@ -271,15 +271,13 @@ u32 ipu_pre_get_baddr(struct ipu_pre *pre) static int ipu_pre_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - struct resource *res; struct ipu_pre *pre; pre = devm_kzalloc(dev, sizeof(*pre), GFP_KERNEL); if (!pre) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - pre->regs = devm_ioremap_resource(&pdev->dev, res); + pre->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(pre->regs)) return PTR_ERR(pre->regs);