summaryrefslogtreecommitdiffstats
path: root/drivers/clk/sprd
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2023-03-10 15:47:01 +0100
committerStephen Boyd <sboyd@kernel.org>2023-03-15 01:35:38 +0100
commitd02fddf24f984b977633c56e10653a8ff19e8c7b (patch)
tree7220585c1ecef76b47e61d64191e1e80697fbb71 /drivers/clk/sprd
parentLinux 6.3-rc1 (diff)
downloadlinux-d02fddf24f984b977633c56e10653a8ff19e8c7b.tar.xz
linux-d02fddf24f984b977633c56e10653a8ff19e8c7b.zip
clk: 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/20230310144701.1541504-1-robh@kernel.org Acked-by: Chunyan Zhang <zhang.lyra@gmail.com> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk/sprd')
-rw-r--r--drivers/clk/sprd/common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clk/sprd/common.c b/drivers/clk/sprd/common.c
index ce81e4087a8f..1a3795a61f81 100644
--- a/drivers/clk/sprd/common.c
+++ b/drivers/clk/sprd/common.c
@@ -44,7 +44,7 @@ int sprd_clk_regmap_init(struct platform_device *pdev,
struct device_node *node = dev->of_node, *np;
struct regmap *regmap;
- if (of_find_property(node, "sprd,syscon", NULL)) {
+ if (of_property_present(node, "sprd,syscon")) {
regmap = syscon_regmap_lookup_by_phandle(node, "sprd,syscon");
if (IS_ERR(regmap)) {
pr_err("%s: failed to get syscon regmap\n", __func__);