diff options
author | Jonas Gorski <jogo@openwrt.org> | 2013-03-11 19:13:47 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-03-12 15:14:48 -0400 |
commit | b66c7730027509620ced3c7ebc84e28f623ebe9a (patch) | |
tree | d7236fb21bd28f780b6c82d9caa94330f5f18c78 /drivers/spi/spi-bcm63xx.c | |
parent | 68792e2a1989bf34a9498356c3e3cc70b9231df2 (diff) |
spi/bcm63xx: use devm_ioremap_resource()
Use devm_ioremap_resource() which provides its own error messages.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
Acked-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/spi/spi-bcm63xx.c')
-rw-r--r-- | drivers/spi/spi-bcm63xx.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/drivers/spi/spi-bcm63xx.c b/drivers/spi/spi-bcm63xx.c index 2d64db4ac6a2..973099bd760d 100644 --- a/drivers/spi/spi-bcm63xx.c +++ b/drivers/spi/spi-bcm63xx.c | |||
@@ -412,18 +412,9 @@ static int bcm63xx_spi_probe(struct platform_device *pdev) | |||
412 | platform_set_drvdata(pdev, master); | 412 | platform_set_drvdata(pdev, master); |
413 | bs->pdev = pdev; | 413 | bs->pdev = pdev; |
414 | 414 | ||
415 | if (!devm_request_mem_region(&pdev->dev, r->start, | 415 | bs->regs = devm_ioremap_resource(&pdev->dev, r); |
416 | resource_size(r), PFX)) { | 416 | if (IS_ERR(bs->regs)) { |
417 | dev_err(dev, "iomem request failed\n"); | 417 | ret = PTR_ERR(bs->regs); |
418 | ret = -ENXIO; | ||
419 | goto out_err; | ||
420 | } | ||
421 | |||
422 | bs->regs = devm_ioremap_nocache(&pdev->dev, r->start, | ||
423 | resource_size(r)); | ||
424 | if (!bs->regs) { | ||
425 | dev_err(dev, "unable to ioremap regs\n"); | ||
426 | ret = -ENOMEM; | ||
427 | goto out_err; | 418 | goto out_err; |
428 | } | 419 | } |
429 | 420 | ||