From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754513AbbC3URX (ORCPT ); Mon, 30 Mar 2015 16:17:23 -0400 Received: from mail-wi0-f181.google.com ([209.85.212.181]:38201 "EHLO mail-wi0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754491AbbC3URS (ORCPT ); Mon, 30 Mar 2015 16:17:18 -0400 From: Daniel Lezcano To: tglx@linutronix.de, mingo@kernel.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, maxime.ripard@free-electrons.com, viresh.kumar@linaro.org, ben.dooks@codethink.co.uk, digetx@gmail.com, hdegoede@redhat.com, laurent.pinchart+renesas@ideasonboard.com Subject: [PATCH 01/11] clocksource: arm_arch_timer: Rename arch_timer_probed to reflect behaviour Date: Mon, 30 Mar 2015 22:17:03 +0200 Message-Id: <1427746633-9137-1-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <5519AEB2.8050306@linaro.org> References: <5519AEB2.8050306@linaro.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Laurent Pinchart The arch_timer_probed function returns whether the given time doesn't need to be probed. This can be the case when the timer has been probed already, but also when it has no corresponding enabled node in DT. Rename the function to arch_timer_need_probe and invert its return value to better reflect the function's purpose and behaviour. Acked-by: Sudeep Holla Signed-off-by: Laurent Pinchart Signed-off-by: Daniel Lezcano --- drivers/clocksource/arm_arch_timer.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c index a3025e7..50bb7f2 100644 --- a/drivers/clocksource/arm_arch_timer.c +++ b/drivers/clocksource/arm_arch_timer.c @@ -661,17 +661,17 @@ static const struct of_device_id arch_timer_mem_of_match[] __initconst = { }; static bool __init -arch_timer_probed(int type, const struct of_device_id *matches) +arch_timer_need_probe(int type, const struct of_device_id *matches) { struct device_node *dn; - bool probed = true; + bool need_probe = false; dn = of_find_matching_node(NULL, matches); if (dn && of_device_is_available(dn) && !(arch_timers_present & type)) - probed = false; + need_probe = true; of_node_put(dn); - return probed; + return need_probe; } static void __init arch_timer_common_init(void) @@ -680,9 +680,10 @@ static void __init arch_timer_common_init(void) /* Wait until both nodes are probed if we have two timers */ if ((arch_timers_present & mask) != mask) { - if (!arch_timer_probed(ARCH_MEM_TIMER, arch_timer_mem_of_match)) + if (arch_timer_need_probe(ARCH_MEM_TIMER, + arch_timer_mem_of_match)) return; - if (!arch_timer_probed(ARCH_CP15_TIMER, arch_timer_of_match)) + if (arch_timer_need_probe(ARCH_CP15_TIMER, arch_timer_of_match)) return; } -- 1.9.1