From: Wolfram Sang Date: Fri, 17 Jul 2009 15:47:37 +0000 (+0200) Subject: mtd: plat-ram: use resource_size X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=76d6a4791609e4d14b411a513c7648b19b258d8f;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git mtd: plat-ram: use resource_size Signed-off-by: Wolfram Sang Signed-off-by: Artem Bityutskiy Signed-off-by: David Woodhouse --- diff --git a/drivers/mtd/maps/plat-ram.c b/drivers/mtd/maps/plat-ram.c index 49c9ece76477..dafb91944e70 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;