summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2011-07-22 22:47:21 +0300
committerGrant Likely <grant.likely@secretlab.ca>2011-08-01 12:55:02 +0100
commit28c1b6d60e3ad0aecf48aaefc6995904e2ab1b9e (patch)
tree0d9839aa21cdf9eadf660705f520ec34e47ae506
parent3da3f872aa175f59e20766ed30aaea67fd4fa7d1 (diff)
downloadop-kernel-dev-28c1b6d60e3ad0aecf48aaefc6995904e2ab1b9e.zip
op-kernel-dev-28c1b6d60e3ad0aecf48aaefc6995904e2ab1b9e.tar.gz
of: address: use resource_size helper
that should be the approved way of calculating the size of resources. No functional changes. Cc: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
-rw-r--r--drivers/of/address.c2
1 files changed, 1 insertions, 1 deletions
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);
OpenPOWER on IntegriCloud