microblaze: Use of_property_present() for non-boolean properties microblaze-v6.16
authorRob Herring (Arm) <robh@kernel.org>
Tue, 31 Dec 2024 16:14:23 +0000 (10:14 -0600)
committerMichal Simek <michal.simek@amd.com>
Mon, 3 Feb 2025 10:29:42 +0000 (11:29 +0100)
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>
Link: https://lore.kernel.org/r/20241231161424.214934-1-robh@kernel.org
Signed-off-by: Michal Simek <michal.simek@amd.com>
arch/microblaze/kernel/timer.c

index 26c3855..ccb4b4b 100644 (file)
@@ -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)