Patchwork [2/2] mtd/plat-ram: use resource_size()

login
register
mail settings
Submitter Wolfram Sang
Date July 17, 2009, 3:47 p.m.
Message ID <1247845657-23426-1-git-send-email-w.sang@pengutronix.de>
Download mbox | patch
Permalink /patch/29925/
State New
Headers show

Comments

Wolfram Sang - July 17, 2009, 3:47 p.m.
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
---
 drivers/mtd/maps/plat-ram.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/drivers/mtd/maps/plat-ram.c b/drivers/mtd/maps/plat-ram.c
index 49c9ece..dafb919 100644
--- a/drivers/mtd/maps/plat-ram.c
+++ b/drivers/mtd/maps/plat-ram.c
@@ -175,7 +175,7 @@  static int platram_probe(struct platform_device *pdev)
 	/* setup map parameters */
 
 	info->map.phys = res->start;
-	info->map.size = (res->end - res->start) + 1;
+	info->map.size = resource_size(res);
 	info->map.name = pdata->mapname != NULL ?
 			(char *)pdata->mapname : (char *)pdev->name;
 	info->map.bankwidth = pdata->bankwidth;