summaryrefslogtreecommitdiffstats
path: root/drivers/interconnect
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2023-03-10 15:47:08 +0100
committerGeorgi Djakov <djakov@kernel.org>2023-03-20 15:42:27 +0100
commit213913ff2b89ab5ba76aceba24198b217e8e325c (patch)
tree639b85df84478519153afef796e687dc6b7465dc /drivers/interconnect
parentinterconnect: qcom: osm-l3: drop unuserd header inclusion (diff)
downloadlinux-213913ff2b89ab5ba76aceba24198b217e8e325c.tar.xz
linux-213913ff2b89ab5ba76aceba24198b217e8e325c.zip
interconnect: Use of_property_present() for testing DT property presence
It is preferred to use typed property access functions (i.e. of_property_read_<type> functions) rather than low-level of_get_property/of_find_property functions for reading properties. As part of this, convert of_get_property/of_find_property calls to the recently added of_property_present() helper when we just want to test for presence of a property and nothing more. Signed-off-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20230310144709.1542841-1-robh@kernel.org Signed-off-by: Georgi Djakov <djakov@kernel.org>
Diffstat (limited to 'drivers/interconnect')
-rw-r--r--drivers/interconnect/core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/interconnect/core.c b/drivers/interconnect/core.c
index 446c9d1fb486..4175a42bf748 100644
--- a/drivers/interconnect/core.c
+++ b/drivers/interconnect/core.c
@@ -451,7 +451,7 @@ struct icc_path *of_icc_get_by_index(struct device *dev, int idx)
* When the consumer DT node do not have "interconnects" property
* return a NULL path to skip setting constraints.
*/
- if (!of_find_property(np, "interconnects", NULL))
+ if (!of_property_present(np, "interconnects"))
return NULL;
/*
@@ -544,7 +544,7 @@ struct icc_path *of_icc_get(struct device *dev, const char *name)
* When the consumer DT node do not have "interconnects" property
* return a NULL path to skip setting constraints.
*/
- if (!of_find_property(np, "interconnects", NULL))
+ if (!of_property_present(np, "interconnects"))
return NULL;
/*