summaryrefslogtreecommitdiff
path: root/include/linux/cpuidle.h
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-08-24 00:21:07 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-08-30 04:06:27 +0300
commit34c2f65b718d44ea7d7b3cc10777f410677455ce (patch)
tree70a9a541937ff04eb67c1bda48f81da664231df6 /include/linux/cpuidle.h
parentdc2251bf98c66db3f4e055b751968f0871037ae4 (diff)
downloadlinux-34c2f65b718d44ea7d7b3cc10777f410677455ce.tar.xz
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>
Diffstat (limited to 'include/linux/cpuidle.h')
-rw-r--r--include/linux/cpuidle.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h
index b58d952a00e2..561bc5365067 100644
--- a/include/linux/cpuidle.h
+++ b/include/linux/cpuidle.h
@@ -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 *
******************************/