summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-img-spfi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/spi/spi-img-spfi.c')
-rw-r--r--drivers/spi/spi-img-spfi.c3
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;