Commit 2f0cb475 authored by Rob Herring's avatar Rob Herring

of: Use of_property_present() helper

Use of_property_present() instead of of_get_property/of_find_property()
in places where we just need to test presence of a property.
Reviewed-by: default avatarFrank Rowand <frowand.list@gmail.com>
Tested-by: default avatarFrank Rowand <frowand.list@gmail.com>
Link: https://lore.kernel.org/all/20230215215547.691573-2-robh@kernel.org/Signed-off-by: default avatarRob Herring <robh@kernel.org>
parent 9cbad37c
...@@ -528,7 +528,7 @@ static int __init of_platform_default_populate_init(void) ...@@ -528,7 +528,7 @@ static int __init of_platform_default_populate_init(void)
int ret; int ret;
/* Check if we have a MacOS display without a node spec */ /* Check if we have a MacOS display without a node spec */
if (of_get_property(of_chosen, "linux,bootx-noscreen", NULL)) { if (of_property_present(of_chosen, "linux,bootx-noscreen")) {
/* /*
* The old code tried to work out which node was the MacOS * The old code tried to work out which node was the MacOS
* display based on the address. I'm dropping that since the * display based on the address. I'm dropping that since the
......
...@@ -1086,7 +1086,7 @@ static struct device_node *of_get_compat_node(struct device_node *np) ...@@ -1086,7 +1086,7 @@ static struct device_node *of_get_compat_node(struct device_node *np)
np = NULL; np = NULL;
} }
if (of_find_property(np, "compatible", NULL)) if (of_property_present(np, "compatible"))
break; break;
np = of_get_next_parent(np); np = of_get_next_parent(np);
......
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