Skip to content

Commit 08b97fb

Browse files
robherringdlezcano
authored andcommitted
clocksource/drivers/arm_arch_timer: 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. Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20241104190505.272805-2-robh@kernel.org Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
1 parent 5569d73 commit 08b97fb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

drivers/clocksource/arm_arch_timer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1428,7 +1428,7 @@ static int __init arch_timer_of_init(struct device_node *np)
14281428

14291429
arch_timers_present |= ARCH_TIMER_TYPE_CP15;
14301430

1431-
has_names = of_property_read_bool(np, "interrupt-names");
1431+
has_names = of_property_present(np, "interrupt-names");
14321432

14331433
for (i = ARCH_TIMER_PHYS_SECURE_PPI; i < ARCH_TIMER_MAX_TIMER_PPI; i++) {
14341434
if (has_names)

drivers/clocksource/timer-ti-dm-systimer.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,10 +202,10 @@ static bool __init dmtimer_is_preferred(struct device_node *np)
202202

203203
/* Secure gptimer12 is always clocked with a fixed source */
204204
if (!of_property_read_bool(np, "ti,timer-secure")) {
205-
if (!of_property_read_bool(np, "assigned-clocks"))
205+
if (!of_property_present(np, "assigned-clocks"))
206206
return false;
207207

208-
if (!of_property_read_bool(np, "assigned-clock-parents"))
208+
if (!of_property_present(np, "assigned-clock-parents"))
209209
return false;
210210
}
211211

0 commit comments

Comments
 (0)