diff mbox

mmci-omap: Use resource_size

Message ID 1273133059-6335-1-git-send-email-tklauser@distanz.ch (mailing list archive)
State New, archived
Headers show

Commit Message

Tobias Klauser May 6, 2010, 8:04 a.m. UTC
None
diff mbox

Patch

diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c
index 84d2804..a2c8545 100644
--- a/drivers/mmc/host/omap.c
+++ b/drivers/mmc/host/omap.c
@@ -1415,7 +1415,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;
@@ -1537,7 +1537,7 @@  static int mmc_omap_remove(struct platform_device *pdev)
 
 	iounmap(host->virt_base);
 	release_mem_region(pdev->resource[0].start,
-			   pdev->resource[0].end - pdev->resource[0].start + 1);
+			   resource_size(&pdev->resource[0]));
 
 	kfree(host);