diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-05-16 01:38:15 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-05-19 02:44:24 +0200 |
commit | 87e9b9f1d86c2ee9a10c2a4186a72d0af4cc963e (patch) | |
tree | d4967e50be04ffa2de19025b6c51f92284755a01 /include/linux/tick.h | |
parent | 671767360db8fdd1f082d15fb4b0107c1bb94a0b (diff) | |
download | op-kernel-dev-87e9b9f1d86c2ee9a10c2a4186a72d0af4cc963e.zip op-kernel-dev-87e9b9f1d86c2ee9a10c2a4186a72d0af4cc963e.tar.gz |
PM / sleep: Make suspend-to-idle-specific code depend on CONFIG_SUSPEND
Since idle_should_freeze() is defined to always return 'false'
for CONFIG_SUSPEND unset, all of the code depending on it in
cpuidle_idle_call() is not necessary in that case.
Make that code depend on CONFIG_SUSPEND too to avoid building it
when it is not going to be used.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux/tick.h')
-rw-r--r-- | include/linux/tick.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/include/linux/tick.h b/include/linux/tick.h index f8492da5..ec6e8bc 100644 --- a/include/linux/tick.h +++ b/include/linux/tick.h @@ -13,8 +13,6 @@ #ifdef CONFIG_GENERIC_CLOCKEVENTS extern void __init tick_init(void); -extern void tick_freeze(void); -extern void tick_unfreeze(void); /* Should be core only, but ARM BL switcher requires it */ extern void tick_suspend_local(void); /* Should be core only, but XEN resume magic and ARM BL switcher require it */ @@ -23,14 +21,20 @@ extern void tick_handover_do_timer(void); extern void tick_cleanup_dead_cpu(int cpu); #else /* CONFIG_GENERIC_CLOCKEVENTS */ static inline void tick_init(void) { } -static inline void tick_freeze(void) { } -static inline void tick_unfreeze(void) { } static inline void tick_suspend_local(void) { } static inline void tick_resume_local(void) { } static inline void tick_handover_do_timer(void) { } static inline void tick_cleanup_dead_cpu(int cpu) { } #endif /* !CONFIG_GENERIC_CLOCKEVENTS */ +#if defined(CONFIG_GENERIC_CLOCKEVENTS) && defined(CONFIG_SUSPEND) +extern void tick_freeze(void); +extern void tick_unfreeze(void); +#else +static inline void tick_freeze(void) { } +static inline void tick_unfreeze(void) { } +#endif + #ifdef CONFIG_TICK_ONESHOT extern void tick_irq_enter(void); # ifndef arch_needs_cpu |