cacheinfo: Use of_property_present() for non-boolean properties
PATCH 1/1 cacheinfo: 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.
Signed-off-by Rob Herring (Arm) <[email protected]>
--- drivers/base/cacheinfo.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/base/cacheinfo.c +3 -3
@@ -254,11 +254,11 @@ static int of_count_cache_leaves(struct device_node *np) {unsigned int leaves =0 ; -if (of_property_read_bool (np,"cache-size" )) +if (of_property_present (np,"cache-size" )) ++leaves; -if (of_property_read_bool (np,"i-cache-size" )) +if (of_property_present (np,"i-cache-size" )) ++leaves; -if (of_property_read_bool (np,"d-cache-size" )) +if (of_property_present (np,"d-cache-size" )) ++leaves;if (!leaves) {
Signature · 1 line
2.45.2