aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/of
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2023-02-09 17:20:43 -0600
committerRob Herring <robh@kernel.org>2023-02-17 15:21:36 -0600
commit2f0cb4753dd2b5fe71d04407213e2ef253dcdd32 (patch)
treeb30d82a0e3faa4f3e879d36591d9755aaca29c30 /drivers/of
parent9cbad37ce8122de32a1529e394b468bc101c9e7f (diff)
downloadlinux-2f0cb4753dd2b5fe71d04407213e2ef253dcdd32.tar.gz
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: Frank Rowand <frowand.list@gmail.com> Tested-by: Frank Rowand <frowand.list@gmail.com> Link: https://lore.kernel.org/all/20230215215547.691573-2-robh@kernel.org/ Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'drivers/of')
-rw-r--r--drivers/of/platform.c2
-rw-r--r--drivers/of/property.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index 81c8c227ab6bf2..f7d796b540392d 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -528,7 +528,7 @@ static int __init of_platform_default_populate_init(void)
int ret;
/* 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
* display based on the address. I'm dropping that since the
diff --git a/drivers/of/property.c b/drivers/of/property.c
index 134cfc980b70b3..ff71d2ac26cb7d 100644
--- a/drivers/of/property.c
+++ b/drivers/of/property.c
@@ -1086,7 +1086,7 @@ static struct device_node *of_get_compat_node(struct device_node *np)
np = NULL;
}
- if (of_find_property(np, "compatible", NULL))
+ if (of_property_present(np, "compatible"))
break;
np = of_get_next_parent(np);