From: Yangtao Li Date: Tue, 4 Jul 2023 10:02:52 +0000 (+0800) Subject: irqchip/ls-scfg-msi: Use devm_platform_get_and_ioremap_resource() X-Git-Tag: v6.6.17~4134^2^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=32b5f8a6f5de384291ea4083541ad10725c7a054;p=platform%2Fkernel%2Flinux-rpi.git irqchip/ls-scfg-msi: Use devm_platform_get_and_ioremap_resource() Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yangtao Li Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230704100253.36045-1-frank.li@vivo.com --- diff --git a/drivers/irqchip/irq-ls-scfg-msi.c b/drivers/irqchip/irq-ls-scfg-msi.c index f5ba3f9..f31a262 100644 --- a/drivers/irqchip/irq-ls-scfg-msi.c +++ b/drivers/irqchip/irq-ls-scfg-msi.c @@ -349,8 +349,7 @@ static int ls_scfg_msi_probe(struct platform_device *pdev) msi_data->cfg = (struct ls_scfg_msi_cfg *) match->data; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - msi_data->regs = devm_ioremap_resource(&pdev->dev, res); + msi_data->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(msi_data->regs)) { dev_err(&pdev->dev, "failed to initialize 'regs'\n"); return PTR_ERR(msi_data->regs);