mirror of
https://github.com/torvalds/linux.git
synced 2024-12-29 14:21:47 +00:00
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>
This commit is contained in:
parent
3be6acda82
commit
a977c3a93f
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user