diff mbox series

ARM: omap2: Use of_property_read_bool() for boolean properties

Message ID 20230310144655.1540793-1-robh@kernel.org (mailing list archive)
State New, archived
Headers show
Series ARM: omap2: Use of_property_read_bool() for boolean properties | expand

Commit Message

Rob Herring (Arm) March 10, 2023, 2:46 p.m. UTC
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.
Convert reading boolean properties to to of_property_read_bool().

Signed-off-by: Rob Herring <robh@kernel.org>
---
 arch/arm/mach-omap2/omap_hwmod.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Tony Lindgren March 27, 2023, 7:55 a.m. UTC | #1
* Rob Herring <robh@kernel.org> [230310 16:47]:
> 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.
> Convert reading boolean properties to to of_property_read_bool().

Applying into omap-for-v6.4/cleanup thanks.

Tony
diff mbox series

Patch

diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 5a2a9b8e61ed..989195f6f7be 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -2322,11 +2322,11 @@  static int __init _init_mpu_rt_base(struct omap_hwmod *oh, void *data,
 static void __init parse_module_flags(struct omap_hwmod *oh,
 				      struct device_node *np)
 {
-	if (of_find_property(np, "ti,no-reset-on-init", NULL))
+	if (of_property_read_bool(np, "ti,no-reset-on-init"))
 		oh->flags |= HWMOD_INIT_NO_RESET;
-	if (of_find_property(np, "ti,no-idle-on-init", NULL))
+	if (of_property_read_bool(np, "ti,no-idle-on-init"))
 		oh->flags |= HWMOD_INIT_NO_IDLE;
-	if (of_find_property(np, "ti,no-idle", NULL))
+	if (of_property_read_bool(np, "ti,no-idle"))
 		oh->flags |= HWMOD_NO_IDLE;
 }