diff options
| author | Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> | 2017-07-08 16:29:51 -0400 |
|---|---|---|
| committer | Rob Herring <robh@kernel.org> | 2017-07-21 10:59:33 -0400 |
| commit | 6a245d959c747079e88bb1c61baa61d43d460a44 (patch) | |
| tree | 151db1837853d62bd5b68a9520f29d3ac30c284f | |
| parent | d1651b03c2df75db8eda3fbcd3a07adb337ee8b0 (diff) | |
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: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Rob Herring <robh@kernel.org>
| -rw-r--r-- | drivers/of/irq.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/of/irq.c b/drivers/of/irq.c index 9c4b32522bc2..1f6ef2305daa 100644 --- a/drivers/of/irq.c +++ b/drivers/of/irq.c | |||
| @@ -169,8 +169,7 @@ int of_irq_parse_raw(const __be32 *addr, struct of_phandle_args *out_irq) | |||
| 169 | /* Now check if cursor is an interrupt-controller and if it is | 169 | /* Now check if cursor is an interrupt-controller and if it is |
| 170 | * then we are done | 170 | * then we are done |
| 171 | */ | 171 | */ |
| 172 | if (of_get_property(ipar, "interrupt-controller", NULL) != | 172 | if (of_property_read_bool(ipar, "interrupt-controller")) { |
| 173 | NULL) { | ||
| 174 | pr_debug(" -> got it !\n"); | 173 | pr_debug(" -> got it !\n"); |
| 175 | return 0; | 174 | return 0; |
| 176 | } | 175 | } |
| @@ -508,7 +507,7 @@ void __init of_irq_init(const struct of_device_id *matches) | |||
| 508 | INIT_LIST_HEAD(&intc_parent_list); | 507 | INIT_LIST_HEAD(&intc_parent_list); |
| 509 | 508 | ||
| 510 | for_each_matching_node_and_match(np, matches, &match) { | 509 | for_each_matching_node_and_match(np, matches, &match) { |
| 511 | if (!of_find_property(np, "interrupt-controller", NULL) || | 510 | if (!of_property_read_bool(np, "interrupt-controller") || |
| 512 | !of_device_is_available(np)) | 511 | !of_device_is_available(np)) |
| 513 | continue; | 512 | continue; |
| 514 | 513 | ||
