diff mbox

+ drivers-mmc-host-omapc-use-resource_size.patch added to -mm tree

Message ID 201008272053.o7RKrjth015449@imap1.linux-foundation.org (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Andrew Morton Aug. 27, 2010, 8:53 p.m. UTC
None
diff mbox

Patch

diff -puN drivers/mmc/host/omap.c~drivers-mmc-host-omapc-use-resource_size drivers/mmc/host/omap.c
--- a/drivers/mmc/host/omap.c~drivers-mmc-host-omapc-use-resource_size
+++ a/drivers/mmc/host/omap.c
@@ -1416,7 +1416,7 @@  static int __init mmc_omap_probe(struct 
 	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;
@@ -1456,7 +1456,7 @@  static int __init mmc_omap_probe(struct 
 
 	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;
 
@@ -1513,7 +1513,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;
 }