From: Yangtao Li Date: Wed, 5 Jul 2023 09:46:48 +0000 (+0800) Subject: fpga: bridge: Convert to devm_platform_ioremap_resource() X-Git-Tag: v6.6.7~2016^2~30^2~16 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=918e6224cd17ceb39c6d10b62039ab8292d469c0;p=platform%2Fkernel%2Flinux-starfive.git fpga: bridge: 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/20230705094655.44753-1-frank.li@vivo.com Signed-off-by: Xu Yilun --- diff --git a/drivers/fpga/altera-freeze-bridge.c b/drivers/fpga/altera-freeze-bridge.c index 445f4b0..bb6b02e 100644 --- a/drivers/fpga/altera-freeze-bridge.c +++ b/drivers/fpga/altera-freeze-bridge.c @@ -213,14 +213,12 @@ static int altera_freeze_br_probe(struct platform_device *pdev) void __iomem *base_addr; struct altera_freeze_br_data *priv; struct fpga_bridge *br; - struct resource *res; u32 status, revision; if (!np) return -ENODEV; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - base_addr = devm_ioremap_resource(dev, res); + base_addr = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(base_addr)) return PTR_ERR(base_addr);