[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241217-of_core_fix-v3-4-3bc49a2e8bda@quicinc.com>
Date: Tue, 17 Dec 2024 21:07:28 +0800
From: Zijun Hu <zijun_hu@...oud.com>
To: Rob Herring <robh@...nel.org>, Saravana Kannan <saravanak@...gle.com>,
Maxime Ripard <mripard@...nel.org>, Robin Murphy <robin.murphy@....com>,
Grant Likely <grant.likely@...retlab.ca>
Cc: Zijun Hu <zijun_hu@...oud.com>, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, Zijun Hu <quic_zijuhu@...cinc.com>
Subject: [PATCH v3 4/7] of: property: Use of_property_present() for
of_fwnode_property_present()
From: Zijun Hu <quic_zijuhu@...cinc.com>
Use of_property_present() instead of of_property_read_bool() for
of_fwnode_property_present() since the former is more applicable
obviously.
Signed-off-by: Zijun Hu <quic_zijuhu@...cinc.com>
---
Hi Rob,
i pick up this change again after some considerations as below:
1) of_property_present() is more suitable than of_property_read_bool()
here, deprecated API is not main reason.
2) it does not conflict with your job which warns when use
of_property_read_bool() for non-bool property.
---
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
Powered by blists - more mailing lists