Skip to content

Commit 2d038ef

Browse files
robherringgregkh
authored andcommitted
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]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 5852357 commit 2d038ef

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/base/cacheinfo.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,11 +254,11 @@ static int of_count_cache_leaves(struct device_node *np)
254254
{
255255
unsigned int leaves = 0;
256256

257-
if (of_property_read_bool(np, "cache-size"))
257+
if (of_property_present(np, "cache-size"))
258258
++leaves;
259-
if (of_property_read_bool(np, "i-cache-size"))
259+
if (of_property_present(np, "i-cache-size"))
260260
++leaves;
261-
if (of_property_read_bool(np, "d-cache-size"))
261+
if (of_property_present(np, "d-cache-size"))
262262
++leaves;
263263

264264
if (!leaves) {

0 commit comments

Comments
 (0)