From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753133AbbETJLU (ORCPT ); Wed, 20 May 2015 05:11:20 -0400 Received: from mail-pa0-f54.google.com ([209.85.220.54]:33433 "EHLO mail-pa0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752785AbbETJLM (ORCPT ); Wed, 20 May 2015 05:11:12 -0400 From: Viresh Kumar To: Thomas Gleixner Cc: linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org, Ingo Molnar , Peter Zijlstra , Viresh Kumar Subject: [PATCH 1/2] clockevents: Move 'enum clock_event_state' to tick-internal.h Date: Wed, 20 May 2015 14:36:55 +0530 Message-Id: <6d69a7858bc0fcc19936ab0809cbf1a0f4785a67.1432112458.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.4.0 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org CLOCK_EVT_STATE_* symbols are local to the kernel/time and shouldn't be exposed to other parts of the kernel. They were added to clockchips.h as there was one external user (arch/arm/common/bL_switcher.c). That is modified now to not use these symbols directly: 7270d11c56f5 ("arm/bL_switcher: Kill tick suspend hackery") We can now move them to a file local to kernel/time. Signed-off-by: Viresh Kumar --- include/linux/clockchips.h | 23 +---------------------- kernel/time/tick-internal.h | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h index 271fa4c8eb29..62d3007f8a8c 100644 --- a/include/linux/clockchips.h +++ b/include/linux/clockchips.h @@ -28,27 +28,6 @@ enum clock_event_mode { }; /* - * Possible states of a clock event device. - * - * DETACHED: Device is not used by clockevents core. Initial state or can be - * reached from SHUTDOWN. - * SHUTDOWN: Device is powered-off. Can be reached from PERIODIC or ONESHOT. - * PERIODIC: Device is programmed to generate events periodically. Can be - * reached from DETACHED or SHUTDOWN. - * ONESHOT: Device is programmed to generate event only once. Can be reached - * from DETACHED or SHUTDOWN. - * ONESHOT_STOPPED: Device was programmed in ONESHOT mode and is temporarily - * stopped. - */ -enum clock_event_state { - CLOCK_EVT_STATE_DETACHED, - CLOCK_EVT_STATE_SHUTDOWN, - CLOCK_EVT_STATE_PERIODIC, - CLOCK_EVT_STATE_ONESHOT, - CLOCK_EVT_STATE_ONESHOT_STOPPED, -}; - -/* * Clock event features */ # define CLOCK_EVT_FEAT_PERIODIC 0x000001 @@ -117,7 +96,7 @@ struct clock_event_device { u32 mult; u32 shift; enum clock_event_mode mode; - enum clock_event_state state; + unsigned int state; unsigned int features; unsigned long retries; diff --git a/kernel/time/tick-internal.h b/kernel/time/tick-internal.h index 65273f0a11ed..04820f64146e 100644 --- a/kernel/time/tick-internal.h +++ b/kernel/time/tick-internal.h @@ -12,6 +12,27 @@ # define TICK_DO_TIMER_NONE -1 # define TICK_DO_TIMER_BOOT -2 +/* + * Possible states of a clock event device. + * + * DETACHED: Device is not used by clockevents core. Initial state or can be + * reached from SHUTDOWN. + * SHUTDOWN: Device is powered-off. Can be reached from PERIODIC or ONESHOT. + * PERIODIC: Device is programmed to generate events periodically. Can be + * reached from DETACHED or SHUTDOWN. + * ONESHOT: Device is programmed to generate event only once. Can be reached + * from DETACHED or SHUTDOWN. + * ONESHOT_STOPPED: Device was programmed in ONESHOT mode and is temporarily + * stopped. + */ +enum clock_event_state { + CLOCK_EVT_STATE_DETACHED, + CLOCK_EVT_STATE_SHUTDOWN, + CLOCK_EVT_STATE_PERIODIC, + CLOCK_EVT_STATE_ONESHOT, + CLOCK_EVT_STATE_ONESHOT_STOPPED, +}; + DECLARE_PER_CPU(struct tick_device, tick_cpu_device); extern ktime_t tick_next_period; extern ktime_t tick_period; -- 2.4.0