summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorChris Ball <cjb@laptop.org>2011-03-22 16:34:41 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2011-03-22 17:44:15 -0700
commit2092014df6e62b3ddfe8b6199da98cacfc055e23 (patch)
treec7498da5bd17bd7f73562fde3631fe194c034e8b /drivers
parente359dc24d32e58c795fc339cb3e89ea6330fceae (diff)
drivers/mmc/host/omap.c: use resource_size()
Signed-off-by: Chris Ball <cjb@laptop.org> Cc: Jarkko Lavinen <jarkko.lavinen@nokia.com> Cc: Tony Lindgren <tony@atomide.com> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/host/omap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c
index 379d2ffe4c8..2e032f0e8cf 100644
--- a/drivers/mmc/host/omap.c
+++ b/drivers/mmc/host/omap.c
@@ -1417,7 +1417,7 @@ static int __init mmc_omap_probe(struct platform_device *pdev)
if (res == NULL || irq < 0)
return -ENXIO;
- res = request_mem_region(res->start, res->end - res->start + 1,
+ res = request_mem_region(res->start, resource_size(res),
pdev->name);
if (res == NULL)
return -EBUSY;
@@ -1457,7 +1457,7 @@ static int __init mmc_omap_probe(struct platform_device *pdev)
host->irq = irq;
host->phys_base = host->mem_res->start;
- host->virt_base = ioremap(res->start, res->end - res->start + 1);
+ host->virt_base = ioremap(res->start, resource_size(res));
if (!host->virt_base)
goto err_ioremap;
@@ -1514,7 +1514,7 @@ err_free_mmc_host:
err_ioremap:
kfree(host);
err_free_mem_region:
- release_mem_region(res->start, res->end - res->start + 1);
+ release_mem_region(res->start, resource_size(res));
return ret;
}