aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfram Sang <w.sang@pengutronix.de>2009-07-17 17:47:37 +0200
committerDavid Woodhouse <David.Woodhouse@intel.com>2009-09-04 09:37:34 +0100
commit76d6a4791609e4d14b411a513c7648b19b258d8f (patch)
treea4ad122fa6a3525b3eedce0cdcf694385e7aa7bb
parent2763c508a3c8f8ec5d6df4e8c63d5e2a5a7d3954 (diff)
mtd: plat-ram: use resource_size
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
-rw-r--r--drivers/mtd/maps/plat-ram.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/maps/plat-ram.c b/drivers/mtd/maps/plat-ram.c
index 49c9ece7647..dafb91944e7 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;