mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 01:10:04 +00:00
spi: bmc2835: 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: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
parent
f722406faa
commit
2d6e75e894
1 changed files with 3 additions and 4 deletions
|
@ -331,10 +331,9 @@ static int bcm2835_spi_probe(struct platform_device *pdev)
|
|||
goto out_master_put;
|
||||
}
|
||||
|
||||
bs->regs = devm_request_and_ioremap(&pdev->dev, res);
|
||||
if (!bs->regs) {
|
||||
dev_err(&pdev->dev, "could not request/map memory region\n");
|
||||
err = -ENODEV;
|
||||
bs->regs = devm_ioremap_resource(&pdev->dev, res);
|
||||
if (IS_ERR(bs->regs)) {
|
||||
err = PTR_ERR(bs->regs);
|
||||
goto out_master_put;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue