From: Felipe Balbi Date: Fri, 22 Jul 2011 19:47:21 +0000 (+0300) Subject: of: address: use resource_size helper X-Git-Tag: v3.12-rc1~5101^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=28c1b6d60e3ad0aecf48aaefc6995904e2ab1b9e;p=kernel%2Fkernel-generic.git of: address: use resource_size helper that should be the approved way of calculating the size of resources. No functional changes. Cc: Grant Likely Signed-off-by: Felipe Balbi Signed-off-by: Grant Likely --- diff --git a/drivers/of/address.c b/drivers/of/address.c index da1f4b9..72c33fb 100644 --- a/drivers/of/address.c +++ b/drivers/of/address.c @@ -610,6 +610,6 @@ void __iomem *of_iomap(struct device_node *np, int index) if (of_address_to_resource(np, index, &res)) return NULL; - return ioremap(res.start, 1 + res.end - res.start); + return ioremap(res.start, resource_size(&res)); } EXPORT_SYMBOL(of_iomap);