mtd: plat-ram: use resource_size

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Fri Sep 4 04:59:03 EDT 2009


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=76d6a4791609e4d14b411a513c7648b19b258d8f
Commit:     76d6a4791609e4d14b411a513c7648b19b258d8f
Parent:     2763c508a3c8f8ec5d6df4e8c63d5e2a5a7d3954
Author:     Wolfram Sang <w.sang at pengutronix.de>
AuthorDate: Fri Jul 17 17:47:37 2009 +0200
Committer:  David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Fri Sep 4 09:37:34 2009 +0100

    mtd: plat-ram: use resource_size
    
    Signed-off-by: Wolfram Sang <w.sang at pengutronix.de>
    Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy at nokia.com>
    Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
 drivers/mtd/maps/plat-ram.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

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;



More information about the linux-mtd-cvs mailing list