mtd: plat-ram: use resource_size
authorWolfram Sang <w.sang@pengutronix.de>
Fri, 17 Jul 2009 15:47:37 +0000 (17:47 +0200)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Fri, 4 Sep 2009 08:37:34 +0000 (09:37 +0100)
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>
drivers/mtd/maps/plat-ram.c

index 49c9ece764770e6f8cfddb9d46fd26b94d22bb47..dafb91944e7027db4103ab8d5a51329ac6a69660 100644 (file)
@@ -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;