diff options
author | Len Brown <len.brown@intel.com> | 2011-04-01 19:34:59 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2011-08-03 19:06:37 -0400 |
commit | a0bfa1373859e9d11dc92561a8667588803e42d8 (patch) | |
tree | ef5768a313ac16a211830efc3edb9ca95487cb6a /include/linux/cpuidle.h | |
parent | 4bfc8288bc4a64529c5547d17349a2a1f4675507 (diff) |
cpuidle: stop depending on pm_idle
cpuidle users should call cpuidle_call_idle() directly
rather than via (pm_idle)() function pointer.
Architecture may choose to continue using (pm_idle)(),
but cpuidle need not depend on it:
my_arch_cpu_idle()
...
if(cpuidle_call_idle())
pm_idle();
cc: Kevin Hilman <khilman@deeprootsystems.com>
cc: Paul Mundt <lethal@linux-sh.org>
cc: x86@kernel.org
Acked-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'include/linux/cpuidle.h')
-rw-r--r-- | include/linux/cpuidle.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h index b89f67da919e..b51629e15cfc 100644 --- a/include/linux/cpuidle.h +++ b/include/linux/cpuidle.h | |||
@@ -123,6 +123,7 @@ struct cpuidle_driver { | |||
123 | 123 | ||
124 | #ifdef CONFIG_CPU_IDLE | 124 | #ifdef CONFIG_CPU_IDLE |
125 | extern void disable_cpuidle(void); | 125 | extern void disable_cpuidle(void); |
126 | extern int cpuidle_idle_call(void); | ||
126 | 127 | ||
127 | extern int cpuidle_register_driver(struct cpuidle_driver *drv); | 128 | extern int cpuidle_register_driver(struct cpuidle_driver *drv); |
128 | struct cpuidle_driver *cpuidle_get_driver(void); | 129 | struct cpuidle_driver *cpuidle_get_driver(void); |
@@ -137,6 +138,7 @@ extern void cpuidle_disable_device(struct cpuidle_device *dev); | |||
137 | 138 | ||
138 | #else | 139 | #else |
139 | static inline void disable_cpuidle(void) { } | 140 | static inline void disable_cpuidle(void) { } |
141 | static inline int cpuidle_idle_call(void) { return -ENODEV; } | ||
140 | 142 | ||
141 | static inline int cpuidle_register_driver(struct cpuidle_driver *drv) | 143 | static inline int cpuidle_register_driver(struct cpuidle_driver *drv) |
142 | {return -ENODEV; } | 144 | {return -ENODEV; } |