Commit b66c7730 authored by Jonas Gorski's avatar Jonas Gorski Committed by Mark Brown

spi/bcm63xx: use devm_ioremap_resource()

Use devm_ioremap_resource() which provides its own error messages.
Signed-off-by: default avatarJonas Gorski <jogo@openwrt.org>
Acked-by: default avatarFlorian Fainelli <florian@openwrt.org>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 68792e2a
...@@ -412,18 +412,9 @@ static int bcm63xx_spi_probe(struct platform_device *pdev) ...@@ -412,18 +412,9 @@ static int bcm63xx_spi_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, master); platform_set_drvdata(pdev, master);
bs->pdev = pdev; bs->pdev = pdev;
if (!devm_request_mem_region(&pdev->dev, r->start, bs->regs = devm_ioremap_resource(&pdev->dev, r);
resource_size(r), PFX)) { if (IS_ERR(bs->regs)) {
dev_err(dev, "iomem request failed\n"); ret = PTR_ERR(bs->regs);
ret = -ENXIO;
goto out_err;
}
bs->regs = devm_ioremap_nocache(&pdev->dev, r->start,
resource_size(r));
if (!bs->regs) {
dev_err(dev, "unable to ioremap regs\n");
ret = -ENOMEM;
goto out_err; goto out_err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment