Thread (1 message) 1 message, 1 author, 2012-03-03

[PATCH 5/5 v2] ARM: kirkwood: convert orion-wdt to fdt.

From: Russell King - ARM Linux <hidden>
Date: 2012-03-03 10:08:53
Also in: linux-devicetree

On Fri, Mar 02, 2012 at 06:32:33PM +0000, Arnd Bergmann wrote:
On Friday 02 March 2012, Jason Cooper wrote:
quoted
+       wdt_reg = (void __iomem *)TIMER_VIRT_BASE;
+
+       ret = of_address_to_resource(np, 0, &res);
+       if (ret) {
+               printk(KERN_ERR "invalid address\n");
+               return ret;
+       }
+
+       wdt_reg = ioremap(res.start, res.end - res.start);
+
This will break non-dt uses because you overwrite the wdt_reg value.
Don't also forget that "res.end - res.start" is also not correct, and
resource_size() should be used to prevent that kind of error.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help