public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] microblaze: Use of_property_present() for non-boolean properties
@ 2024-12-31 16:14 Rob Herring (Arm)
  2025-01-07 16:14 ` Michal Simek
  0 siblings, 1 reply; 2+ messages in thread
From: Rob Herring (Arm) @ 2024-12-31 16:14 UTC (permalink / raw)
  To: Michal Simek; +Cc: linux-kernel

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>
---
 arch/microblaze/kernel/timer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/microblaze/kernel/timer.c b/arch/microblaze/kernel/timer.c
index 26c385582c3b..ccb4b4b59bca 100644
--- a/arch/microblaze/kernel/timer.c
+++ b/arch/microblaze/kernel/timer.c
@@ -252,7 +252,7 @@ static int __init xilinx_timer_init(struct device_node *timer)
 	int ret;
 
 	/* If this property is present, the device is a PWM and not a timer */
-	if (of_property_read_bool(timer, "#pwm-cells"))
+	if (of_property_present(timer, "#pwm-cells"))
 		return 0;
 
 	if (initialized)
-- 
2.45.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] microblaze: Use of_property_present() for non-boolean properties
  2024-12-31 16:14 [PATCH] microblaze: Use of_property_present() for non-boolean properties Rob Herring (Arm)
@ 2025-01-07 16:14 ` Michal Simek
  0 siblings, 0 replies; 2+ messages in thread
From: Michal Simek @ 2025-01-07 16:14 UTC (permalink / raw)
  To: Rob Herring (Arm); +Cc: linux-kernel

út 31. 12. 2024 v 17:14 odesílatel Rob Herring (Arm) <robh@kernel.org> napsal:
>
> 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>
> ---
>  arch/microblaze/kernel/timer.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/microblaze/kernel/timer.c b/arch/microblaze/kernel/timer.c
> index 26c385582c3b..ccb4b4b59bca 100644
> --- a/arch/microblaze/kernel/timer.c
> +++ b/arch/microblaze/kernel/timer.c
> @@ -252,7 +252,7 @@ static int __init xilinx_timer_init(struct device_node *timer)
>         int ret;
>
>         /* If this property is present, the device is a PWM and not a timer */
> -       if (of_property_read_bool(timer, "#pwm-cells"))
> +       if (of_property_present(timer, "#pwm-cells"))
>                 return 0;
>
>         if (initialized)
> --
> 2.45.2
>

Applied.
M


-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-01-07 16:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-31 16:14 [PATCH] microblaze: Use of_property_present() for non-boolean properties Rob Herring (Arm)
2025-01-07 16:14 ` Michal Simek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox