linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] of: address: use resource_size helper
@ 2011-07-22 19:47 Felipe Balbi
       [not found] ` <1311364042-8325-1-git-send-email-balbi-l0cyMroinI0@public.gmane.org>
  2011-08-01 11:55 ` [PATCH 1/2] of: address: use resource_size helper Grant Likely
  0 siblings, 2 replies; 4+ messages in thread
From: Felipe Balbi @ 2011-07-22 19:47 UTC (permalink / raw)
  To: Linux Kernel Mailing List
  Cc: Russell King, Tony Lindgren, devicetree-discuss, Felipe Balbi,
	Grant Likely, Linux OMAP Mailing List,
	Linux ARM Kernel Mailing List

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>
---
 drivers/of/address.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/of/address.c b/drivers/of/address.c
index deefc0c..6e7b2cf 100644
--- a/drivers/of/address.c
+++ b/drivers/of/address.c
@@ -624,6 +624,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);
-- 
1.7.6

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-08-01 11:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-22 19:47 [PATCH 1/2] of: address: use resource_size helper Felipe Balbi
     [not found] ` <1311364042-8325-1-git-send-email-balbi-l0cyMroinI0@public.gmane.org>
2011-07-22 19:47   ` [PATCH 2/2] arm: omap: mark dt_compat __initconst Felipe Balbi
2011-08-01 11:58     ` Grant Likely
2011-08-01 11:55 ` [PATCH 1/2] of: address: use resource_size helper Grant Likely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).