diff options
author | Laurent Navet <laurent.navet@gmail.com> | 2013-05-02 08:13:30 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-05-13 10:10:51 -0400 |
commit | 2d6e75e894f355109d1f256cfdcfca9aafa90b9a (patch) | |
tree | 577abcde99c505e5241771164cf50ee12f71217e /drivers/spi/spi-bcm2835.c | |
parent | f722406faae2d073cc1d01063d1123c35425939e (diff) |
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>
Diffstat (limited to 'drivers/spi/spi-bcm2835.c')
-rw-r--r-- | drivers/spi/spi-bcm2835.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/spi/spi-bcm2835.c b/drivers/spi/spi-bcm2835.c index 89c0b5033114..a4185e492321 100644 --- a/drivers/spi/spi-bcm2835.c +++ b/drivers/spi/spi-bcm2835.c | |||
@@ -331,10 +331,9 @@ static int bcm2835_spi_probe(struct platform_device *pdev) | |||
331 | goto out_master_put; | 331 | goto out_master_put; |
332 | } | 332 | } |
333 | 333 | ||
334 | bs->regs = devm_request_and_ioremap(&pdev->dev, res); | 334 | bs->regs = devm_ioremap_resource(&pdev->dev, res); |
335 | if (!bs->regs) { | 335 | if (IS_ERR(bs->regs)) { |
336 | dev_err(&pdev->dev, "could not request/map memory region\n"); | 336 | err = PTR_ERR(bs->regs); |
337 | err = -ENODEV; | ||
338 | goto out_master_put; | 337 | goto out_master_put; |
339 | } | 338 | } |
340 | 339 | ||