Commit 08b97fbd authored by Rob Herring (Arm)'s avatar Rob Herring (Arm) Committed by Daniel Lezcano
Browse files

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: default avatarRob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/r/20241104190505.272805-2-robh@kernel.org


Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
parent 5569d734
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1428,7 +1428,7 @@ static int __init arch_timer_of_init(struct device_node *np)

	arch_timers_present |= ARCH_TIMER_TYPE_CP15;

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

	for (i = ARCH_TIMER_PHYS_SECURE_PPI; i < ARCH_TIMER_MAX_TIMER_PPI; i++) {
		if (has_names)
+2 −2
Original line number Diff line number Diff line
@@ -202,10 +202,10 @@ static bool __init dmtimer_is_preferred(struct device_node *np)

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

		if (!of_property_read_bool(np, "assigned-clock-parents"))
		if (!of_property_present(np, "assigned-clock-parents"))
			return false;
	}