Skip to contentSkip to conversation

clk: sunxi-ng: Use of_property_present() for non-boolean properties

PATCH Applied Rob Herring (Arm) 2 participants 2 messages Nov 4, 2024 – Nov 5, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clk: sunxi-ng: 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.

---
 drivers/clk/sunxi-ng/ccu-sun6i-rtc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/sunxi-ng/ccu-sun6i-rtc.c +1 -1
index 87e23d16ed0f..724b202863a8 100644
@@ -356,7 +356,7 @@ int sun6i_rtc_ccu_probe(struct device *dev, void __iomem *reg)
 		const char *fw_name;
 
 		/* ext-osc32k was the only input clock in the old binding. */
-		fw_name = of_property_read_bool(dev->of_node, "clock-names")
+		fw_name = of_property_present(dev->of_node, "clock-names")
 			? "ext-osc32k" : NULL;
 		ext_osc32k_clk = devm_clk_get_optional(dev, fw_name);
 		if (IS_ERR(ext_osc32k_clk))
Signature · 1 line
2.45.2
Applied
#1 lore raw
Quoted 5 lines · Rob Herring (Arm)

The use of of_property_read_bool() for non-boolean properties is deprecated in favor of of_property_present() when testing for property presence.

Applied to clk-for-6.13 in [email protected]:linux-sunxi/linux-sunxi.git, thanks!

[1/1] clk: sunxi-ng: Use of_property_present() for non-boolean properties

      commit: 1054861bc258fb5798b7132453593cc3eb0639ba

Best regards,

Signature · 1 line
Chen-Yu Tsai <[email protected]>