Commit 6a245d95 authored by Sergei Shtylyov's avatar Sergei Shtylyov Committed by Rob Herring

of: irq: use of_property_read_bool() for "interrupt-controller" prop

The "interrupt-controller" property is boolean, i.e. has no value.  The DT
interrupt parsing code predates of_property_read_bool(), so it uses either
of_get_property() or of_find_property() -- the former isn't quite correct
for the boolean props (but works somehow). Use the modern boolean prop API
instead.
Signed-off-by: default avatarSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: default avatarRob Herring <robh@kernel.org>
parent d1651b03
...@@ -169,8 +169,7 @@ int of_irq_parse_raw(const __be32 *addr, struct of_phandle_args *out_irq) ...@@ -169,8 +169,7 @@ int of_irq_parse_raw(const __be32 *addr, struct of_phandle_args *out_irq)
/* Now check if cursor is an interrupt-controller and if it is /* Now check if cursor is an interrupt-controller and if it is
* then we are done * then we are done
*/ */
if (of_get_property(ipar, "interrupt-controller", NULL) != if (of_property_read_bool(ipar, "interrupt-controller")) {
NULL) {
pr_debug(" -> got it !\n"); pr_debug(" -> got it !\n");
return 0; return 0;
} }
...@@ -508,7 +507,7 @@ void __init of_irq_init(const struct of_device_id *matches) ...@@ -508,7 +507,7 @@ void __init of_irq_init(const struct of_device_id *matches)
INIT_LIST_HEAD(&intc_parent_list); INIT_LIST_HEAD(&intc_parent_list);
for_each_matching_node_and_match(np, matches, &match) { for_each_matching_node_and_match(np, matches, &match) {
if (!of_find_property(np, "interrupt-controller", NULL) || if (!of_property_read_bool(np, "interrupt-controller") ||
!of_device_is_available(np)) !of_device_is_available(np))
continue; continue;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment