diff mbox

[3/6] mmc: TMIO: Use devm_ioremap()

Message ID 1398877151-6965-4-git-send-email-ian.molton@codethink.co.uk (mailing list archive)
State New, archived
Headers show

Commit Message

Ian Molton April 30, 2014, 4:59 p.m. UTC
Use devm_ioremap for tmio / sh_mobile.

Reviewed-by: Violeta Menendez <violeta.menendez@codethink.co.uk>
Signed-off-by: Ian Molton <ian.molton@codethink.co.uk>
---
 drivers/mmc/host/tmio_mmc_pio.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff mbox

Patch

diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c
index 7db9310..50e8c01 100644
--- a/drivers/mmc/host/tmio_mmc_pio.c
+++ b/drivers/mmc/host/tmio_mmc_pio.c
@@ -1021,7 +1021,7 @@  int tmio_mmc_host_probe(struct tmio_mmc_host *host)
 	if (ret < 0)
 		goto host_free;
 
-	host->ctl = ioremap(res_ctl->start, resource_size(res_ctl));
+	host->ctl = devm_ioremap(dev, res_ctl->start, resource_size(res_ctl));
 	if (!host->ctl) {
 		ret = -ENOMEM;
 		goto host_free;
@@ -1119,7 +1119,6 @@  int tmio_mmc_host_probe(struct tmio_mmc_host *host)
 
 pm_disable:
 	pm_runtime_disable(dev);
-	iounmap(host->ctl);
 host_free:
 	mmc_free_host(mmc);
 
@@ -1145,7 +1144,6 @@  void tmio_mmc_host_remove(struct tmio_mmc_host *host)
 	pm_runtime_put_sync(&pdev->dev);
 	pm_runtime_disable(&pdev->dev);
 
-	iounmap(host->ctl);
 	mmc_free_host(mmc);
 }
 EXPORT_SYMBOL(tmio_mmc_host_remove);