diff options
author | Yangtao Li | 2023-07-04 18:02:52 +0800 |
---|---|---|
committer | Marc Zyngier | 2023-08-21 17:49:11 +0100 |
commit | 32b5f8a6f5de384291ea4083541ad10725c7a054 (patch) | |
tree | 3dd10b3d242da5cf95b32ec066e5802e4b1b2e75 /drivers | |
parent | ee07675046389046d501319b08158b20a8902a5e (diff) |
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 <frank.li@vivo.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20230704100253.36045-1-frank.li@vivo.com
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/irqchip/irq-ls-scfg-msi.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/irqchip/irq-ls-scfg-msi.c b/drivers/irqchip/irq-ls-scfg-msi.c index f5ba3f9f8415..f31a262fe438 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); |