cpuidle: Move polling state initialization code to separate file

Move the polling state initialization code to a separate file built
conditionally on CONFIG_ARCH_HAS_CPU_RELAX to get rid of the #ifdef
in driver.c.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Tested-by: Sudeep Holla <sudeep.holla@arm.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
This commit is contained in:
Rafael J. Wysocki
2017-08-23 23:21:07 +02:00
parent dc2251bf98
commit 34c2f65b71
4 changed files with 43 additions and 31 deletions

View File

@@ -225,6 +225,12 @@ static inline void cpuidle_coupled_parallel_barrier(struct cpuidle_device *dev,
}
#endif
#ifdef CONFIG_ARCH_HAS_CPU_RELAX
void poll_idle_init(struct cpuidle_driver *drv);
#else
static void poll_idle_init(struct cpuidle_driver *drv) {}
#endif
/******************************
* CPUIDLE GOVERNOR INTERFACE *
******************************/