diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2017-05-27 12:23:47 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2017-05-27 12:23:47 +0200 |
commit | b6b3b80fceb175c825ad6c72659e0a72e201fc5f (patch) | |
tree | a422ff414d01ffdfe02015792cc19b19222a9e39 /kernel | |
parent | d3ba5a9a345b1243276f8a982e1bce557c2504fd (diff) |
alarmtimer: Fix posix-timer constification fallout
Some freezer related variables are only used when either CONFIG_POSIX_TIMER
or CONFIG_RTC_CLASS are enabled. Hide them when both are off.
Fixes: d3ba5a9a345b ("posix-timers: Make posix_clocks immutable")
Reported-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Christoph Helwig <hch@lst.de>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/time/alarmtimer.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/time/alarmtimer.c b/kernel/time/alarmtimer.c index 4f4cc3509b30..4cfebfff848d 100644 --- a/kernel/time/alarmtimer.c +++ b/kernel/time/alarmtimer.c @@ -45,11 +45,13 @@ static struct alarm_base { clockid_t base_clockid; } alarm_bases[ALARM_NUMTYPE]; +#if defined(CONFIG_POSIX_TIMERS) || defined(CONFIG_RTC_CLASS) /* freezer information to handle clock_nanosleep triggered wakeups */ static enum alarmtimer_type freezer_alarmtype; static ktime_t freezer_expires; static ktime_t freezer_delta; static DEFINE_SPINLOCK(freezer_delta_lock); +#endif static struct wakeup_source *ws; |