From: Yangtao Li Date: Mon, 10 Jul 2023 13:38:28 +0000 (+0800) Subject: fpga: fpga-mgr: altera-pr-ip: Convert to devm_platform_ioremap_resource() X-Git-Tag: v6.6.17~4035^2~30^2~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c9b5ff3b9a288ba9fc033de8573c50a5ecaeeeef;p=platform%2Fkernel%2Flinux-rpi.git fpga: fpga-mgr: altera-pr-ip: Convert to devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Acked-by: Xu Yilun Link: https://lore.kernel.org/r/20230710133830.65631-1-frank.li@vivo.com Signed-off-by: Xu Yilun --- diff --git a/drivers/fpga/altera-pr-ip-core-plat.c b/drivers/fpga/altera-pr-ip-core-plat.c index b008a6b..06c6a47 100644 --- a/drivers/fpga/altera-pr-ip-core-plat.c +++ b/drivers/fpga/altera-pr-ip-core-plat.c @@ -15,13 +15,9 @@ static int alt_pr_platform_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; void __iomem *reg_base; - struct resource *res; /* First mmio base is for register access */ - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - - reg_base = devm_ioremap_resource(dev, res); - + reg_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(reg_base)) return PTR_ERR(reg_base);