mtd: nand: davinci: use devm_ioremap_resource()
Replace a call to deprecated devm_request_and_ioremap by devm_ioremap_resource. Found with coccicheck and this semantic patch: scripts/coccinelle/api/devm_request_and_ioremap.cocci. Signed-off-by: Laurent Navet <laurent.navet@gmail.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
This commit is contained in:
parent
d914c932d7
commit
59bff7fb7a
|
@ -623,11 +623,14 @@ static int __init nand_davinci_probe(struct platform_device *pdev)
|
||||||
goto err_nomem;
|
goto err_nomem;
|
||||||
}
|
}
|
||||||
|
|
||||||
vaddr = devm_request_and_ioremap(&pdev->dev, res1);
|
vaddr = devm_ioremap_resource(&pdev->dev, res1);
|
||||||
base = devm_request_and_ioremap(&pdev->dev, res2);
|
if (IS_ERR(vaddr)) {
|
||||||
if (!vaddr || !base) {
|
ret = PTR_ERR(vaddr);
|
||||||
dev_err(&pdev->dev, "ioremap failed\n");
|
goto err_ioremap;
|
||||||
ret = -EADDRNOTAVAIL;
|
}
|
||||||
|
base = devm_ioremap_resource(&pdev->dev, res2);
|
||||||
|
if (IS_ERR(base)) {
|
||||||
|
ret = PTR_ERR(base);
|
||||||
goto err_ioremap;
|
goto err_ioremap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue