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>
This commit is contained in:
@@ -441,6 +441,7 @@ void tick_resume(void)
|
||||
tick_resume_local();
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SUSPEND
|
||||
static DEFINE_RAW_SPINLOCK(tick_freeze_lock);
|
||||
static unsigned int tick_freeze_depth;
|
||||
|
||||
@@ -494,6 +495,7 @@ void tick_unfreeze(void)
|
||||
|
||||
raw_spin_unlock(&tick_freeze_lock);
|
||||
}
|
||||
#endif /* CONFIG_SUSPEND */
|
||||
|
||||
/**
|
||||
* tick_init - initialize the tick control
|
||||
|
Reference in New Issue
Block a user