Skip to contentSkip to conversation

interconnect: Use of_property_present() for non-boolean properties

PATCH New Rob Herring (Arm) 1 participant 1 message Nov 4, 2024 Interconnect API

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 interconnect: Use of_property_present() for non-boolean properties

The use of of_property_read_bool() for non-boolean properties is deprecated in favor of of_property_present() when testing for property presence.

---
 drivers/interconnect/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/interconnect/core.c +1 -1
index 7e9b996b47c8..bd5b18d1ca10 100644
@@ -1081,7 +1081,7 @@ static int of_count_icc_providers(struct device_node *np)
 	int count = 0;
 
 	for_each_available_child_of_node(np, child) {
-		if (of_property_read_bool(child, "#interconnect-cells") &&
+		if (of_property_present(child, "#interconnect-cells") &&
 		    likely(!of_match_node(ignore_list, child)))
 			count++;
 		count += of_count_icc_providers(child);
Signature · 1 line
2.45.2