Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Rob Herring (Arm) and committed by
Daniel Lezcano
08b97fbd 5569d734

+3 -3
+1 -1
drivers/clocksource/arm_arch_timer.c
··· 1428 1428 1429 1429 arch_timers_present |= ARCH_TIMER_TYPE_CP15; 1430 1430 1431 - has_names = of_property_read_bool(np, "interrupt-names"); 1431 + has_names = of_property_present(np, "interrupt-names"); 1432 1432 1433 1433 for (i = ARCH_TIMER_PHYS_SECURE_PPI; i < ARCH_TIMER_MAX_TIMER_PPI; i++) { 1434 1434 if (has_names)
+2 -2
drivers/clocksource/timer-ti-dm-systimer.c
··· 202 202 203 203 /* Secure gptimer12 is always clocked with a fixed source */ 204 204 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")) 206 206 return false; 207 207 208 - if (!of_property_read_bool(np, "assigned-clock-parents")) 208 + if (!of_property_present(np, "assigned-clock-parents")) 209 209 return false; 210 210 } 211 211