diff options
author | Mark Brown <broonie@linaro.org> | 2013-10-16 13:22:35 +0100 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-10-16 23:33:16 +0100 |
commit | 31407478a7b56187f9912eb6882a3c623365319f (patch) | |
tree | 6c698c018a4948fdfea640ab009f4e1ad466fe82 | |
parent | 381bd9517a7e611871694689c67901d189cf6a62 (diff) | |
download | linux-31407478a7b56187f9912eb6882a3c623365319f.tar.bz2 |
spi/atmel: Convert to devm_ioremap_resource()
This simplifies error handling.
Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r-- | drivers/spi/spi-atmel.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c index ce4953f74423..118a938776bd 100644 --- a/drivers/spi/spi-atmel.c +++ b/drivers/spi/spi-atmel.c @@ -1546,7 +1546,7 @@ static int atmel_spi_probe(struct platform_device *pdev) INIT_LIST_HEAD(&as->queue); as->pdev = pdev; - as->regs = ioremap(regs->start, resource_size(regs)); + as->regs = devm_ioremap_resource(&pdev->dev, regs); if (!as->regs) goto out_free_buffer; as->phybase = regs->start; @@ -1617,7 +1617,6 @@ out_free_dma: out_free_irq: free_irq(irq, master); out_unmap_regs: - iounmap(as->regs); out_free_buffer: if (!as->use_pdc) tasklet_kill(&as->tasklet); @@ -1669,7 +1668,6 @@ static int atmel_spi_remove(struct platform_device *pdev) clk_disable_unprepare(as->clk); clk_put(as->clk); free_irq(as->irq, master); - iounmap(as->regs); spi_unregister_master(master); |