aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorChris Ball <cjb@laptop.org>2011-03-22 19:34:42 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-03-22 20:44:15 -0400
commit984b203a7237d8d32090b48113c18eb8f824a2be (patch)
tree79903636bc63c393806fb30e530f7e2eb0e5e82b /drivers/mmc
parent2092014df6e62b3ddfe8b6199da98cacfc055e23 (diff)
drivers/mmc/host/omap_hsmmc.c: use resource_size()
Use resource_size(). Signed-off-by: Chris Ball <cjb@laptop.org> Cc: Madhusudhan Chikkature <madhu.cr@ti.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/mmc')
-rw-r--r--drivers/mmc/host/omap_hsmmc.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 158c0ee53b2..259ece047af 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -2047,8 +2047,7 @@ static int __init omap_hsmmc_probe(struct platform_device *pdev)
2047 2047
2048 res->start += pdata->reg_offset; 2048 res->start += pdata->reg_offset;
2049 res->end += pdata->reg_offset; 2049 res->end += pdata->reg_offset;
2050 res = request_mem_region(res->start, res->end - res->start + 1, 2050 res = request_mem_region(res->start, resource_size(res), pdev->name);
2051 pdev->name);
2052 if (res == NULL) 2051 if (res == NULL)
2053 return -EBUSY; 2052 return -EBUSY;
2054 2053
@@ -2287,7 +2286,7 @@ err1:
2287err_alloc: 2286err_alloc:
2288 omap_hsmmc_gpio_free(pdata); 2287 omap_hsmmc_gpio_free(pdata);
2289err: 2288err:
2290 release_mem_region(res->start, res->end - res->start + 1); 2289 release_mem_region(res->start, resource_size(res));
2291 return ret; 2290 return ret;
2292} 2291}
2293 2292
@@ -2324,7 +2323,7 @@ static int omap_hsmmc_remove(struct platform_device *pdev)
2324 2323
2325 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 2324 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
2326 if (res) 2325 if (res)
2327 release_mem_region(res->start, res->end - res->start + 1); 2326 release_mem_region(res->start, resource_size(res));
2328 platform_set_drvdata(pdev, NULL); 2327 platform_set_drvdata(pdev, NULL);
2329 2328
2330 return 0; 2329 return 0;