diff options
author | Rob Herring (Arm) <robh@kernel.org> | 2024-11-04 22:03:42 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-11-10 12:54:07 +0300 |
commit | 2d038efcb4b3e3b9a1d117b3c971364926e59082 (patch) | |
tree | 73ad0f892bd9699c0b355c0835b4ecef93b46a2e /drivers/base | |
parent | 5852357d553829e972eeb575b5b3e39fc573addd (diff) | |
download | linux-2d038efcb4b3e3b9a1d117b3c971364926e59082.tar.xz |
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) <robh@kernel.org>
Link: https://lore.kernel.org/r/20241104190342.270883-1-robh@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/cacheinfo.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/base/cacheinfo.c b/drivers/base/cacheinfo.c index 5344df24fd09..609935ad5091 100644 --- a/drivers/base/cacheinfo.c +++ b/drivers/base/cacheinfo.c @@ -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) { |