diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2022-10-19 17:33:18 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-10-19 15:57:01 +0100 |
commit | a977c3a93fa9ed75fcd77b770c7e557d7b4f7bab (patch) | |
tree | 1689720688c410f97b9f94fd878cc73a161ebcb8 /drivers/spi/spi-img-spfi.c | |
parent | 3be6acda8241352c57d47b4d7d9968cadcb954ea (diff) |
spi: img-spfi: Use devm_platform_get_and_ioremap_resource()
Use the devm_platform_get_and_ioremap_resource() helper instead of calling
platform_get_resource() and devm_ioremap_resource() separately.
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20221019093318.1183190-1-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-img-spfi.c')
-rw-r--r-- | drivers/spi/spi-img-spfi.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/spi/spi-img-spfi.c b/drivers/spi/spi-img-spfi.c index bfd12247f173..257046f843ff 100644 --- a/drivers/spi/spi-img-spfi.c +++ b/drivers/spi/spi-img-spfi.c @@ -540,8 +540,7 @@ static int img_spfi_probe(struct platform_device *pdev) spfi->master = master; spin_lock_init(&spfi->lock); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - spfi->regs = devm_ioremap_resource(spfi->dev, res); + spfi->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(spfi->regs)) { ret = PTR_ERR(spfi->regs); goto put_spi; |