[PATCH 09/10] of: property: Implement of_fwnode_property_present() by of_property_present()

From: Zijun Hu
Date: Thu Dec 05 2024 - 19:55:10 EST


From: Zijun Hu <quic_zijuhu@xxxxxxxxxxx>

of_property_read_bool() is deprecated for non-boolean property, but
of_fwnode_property_present() still uses it.

Fix by using of_property_present() instead of of_property_read_bool().

Signed-off-by: Zijun Hu <quic_zijuhu@xxxxxxxxxxx>
---
drivers/of/property.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/of/property.c b/drivers/of/property.c
index 519bf9229e613906547b57d8c68e7b8558eff327..dca1a3ebccae1093b2b11f51e8e692bca854d0e3 100644
--- a/drivers/of/property.c
+++ b/drivers/of/property.c
@@ -966,7 +966,7 @@ of_fwnode_device_get_dma_attr(const struct fwnode_handle *fwnode)
static bool of_fwnode_property_present(const struct fwnode_handle *fwnode,
const char *propname)
{
- return of_property_read_bool(to_of_node(fwnode), propname);
+ return of_property_present(to_of_node(fwnode), propname);
}

static int of_fwnode_property_read_int_array(const struct fwnode_handle *fwnode,

--
2.34.1