DORMANTno replies

[PATCH] of/irq: use of_find_property() to check for interrupt-controller

From: Daniel Drake <hidden>
Date: 2011-07-21 14:22:42
Subsystem: open firmware and flattened device tree, the rest · Maintainers: Rob Herring, Saravana Kannan, Linus Torvalds

The interrupt-controller property is used as a marker with no value.
This check should check for existence of the property, rather than for
a non-NULL property value.

On the OLPC XO-1.5, this marker property exists in the correct place
but was not being picked up due to having no value. Using
of_find_property() avoids this issue.

Signed-off-by: Daniel Drake <redacted>
---
 drivers/of/irq.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/of/irq.c b/drivers/of/irq.c
index 9f689f1..f86cc43 100644
--- a/drivers/of/irq.c
+++ b/drivers/of/irq.c
@@ -155,7 +155,7 @@ int of_irq_map_raw(struct device_node *parent, const __be32 *intspec,
 		/* Now check if cursor is an interrupt-controller and if it is
 		 * then we are done
 		 */
-		if (of_get_property(ipar, "interrupt-controller", NULL) !=
+		if (of_find_property(ipar, "interrupt-controller", NULL) !=
 				NULL) {
 			pr_debug(" -> got it !\n");
 			for (i = 0; i < intsize; i++)
-- 
1.7.6
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help