diff options
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/omap.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c index c16028872bbb..1e50bf56c2ce 100644 --- a/drivers/mmc/host/omap.c +++ b/drivers/mmc/host/omap.c | |||
@@ -1455,7 +1455,9 @@ static int __init mmc_omap_probe(struct platform_device *pdev) | |||
1455 | 1455 | ||
1456 | host->irq = irq; | 1456 | host->irq = irq; |
1457 | host->phys_base = host->mem_res->start; | 1457 | host->phys_base = host->mem_res->start; |
1458 | host->virt_base = (void __iomem *) IO_ADDRESS(host->phys_base); | 1458 | host->virt_base = ioremap(res->start, res->end - res->start + 1); |
1459 | if (!host->virt_base) | ||
1460 | goto err_ioremap; | ||
1459 | 1461 | ||
1460 | if (cpu_is_omap24xx()) { | 1462 | if (cpu_is_omap24xx()) { |
1461 | host->iclk = clk_get(&pdev->dev, "mmc_ick"); | 1463 | host->iclk = clk_get(&pdev->dev, "mmc_ick"); |
@@ -1510,6 +1512,8 @@ err_free_iclk: | |||
1510 | clk_put(host->iclk); | 1512 | clk_put(host->iclk); |
1511 | } | 1513 | } |
1512 | err_free_mmc_host: | 1514 | err_free_mmc_host: |
1515 | iounmap(host->virt_base); | ||
1516 | err_ioremap: | ||
1513 | kfree(host); | 1517 | kfree(host); |
1514 | err_free_mem_region: | 1518 | err_free_mem_region: |
1515 | release_mem_region(res->start, res->end - res->start + 1); | 1519 | release_mem_region(res->start, res->end - res->start + 1); |
@@ -1536,6 +1540,7 @@ static int mmc_omap_remove(struct platform_device *pdev) | |||
1536 | if (host->fclk && !IS_ERR(host->fclk)) | 1540 | if (host->fclk && !IS_ERR(host->fclk)) |
1537 | clk_put(host->fclk); | 1541 | clk_put(host->fclk); |
1538 | 1542 | ||
1543 | iounmap(host->virt_base); | ||
1539 | release_mem_region(pdev->resource[0].start, | 1544 | release_mem_region(pdev->resource[0].start, |
1540 | pdev->resource[0].end - pdev->resource[0].start + 1); | 1545 | pdev->resource[0].end - pdev->resource[0].start + 1); |
1541 | 1546 | ||