diff options
author | Daniel Lezcano <daniel.lezcano@linaro.org> | 2016-12-05 10:29:42 +0100 |
---|---|---|
committer | dlezcano <dlezcano@linaro.org> | 2017-01-12 14:21:48 +0100 |
commit | e046701f694e1918053c1b6d8fcdf28c41263aa4 (patch) | |
tree | d493d50de385abcd5946e27dd13d9ebd22b19582 | |
parent | b1c580822a55813ba098c15f6773b08d5537a143 (diff) |
cpuidle: Move governor's private structure to the drivers/cpuidle dir
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
-rw-r--r-- | drivers/cpuidle/cpuidle.h | 26 | ||||
-rw-r--r-- | drivers/cpuidle/governors/ladder.c | 2 | ||||
-rw-r--r-- | drivers/cpuidle/governors/menu.c | 2 | ||||
-rw-r--r-- | include/linux/cpuidle.h | 26 |
4 files changed, 30 insertions, 26 deletions
diff --git a/drivers/cpuidle/cpuidle.h b/drivers/cpuidle/cpuidle.h index f87f399b0540..eeb8fd125292 100644 --- a/drivers/cpuidle/cpuidle.h +++ b/drivers/cpuidle/cpuidle.h @@ -68,4 +68,30 @@ static inline void cpuidle_coupled_unregister_device(struct cpuidle_device *dev) } #endif +/****************************** + * CPUIDLE GOVERNOR INTERFACE * + ******************************/ + +struct cpuidle_governor { + char name[CPUIDLE_NAME_LEN]; + struct list_head governor_list; + unsigned int rating; + + int (*enable) (struct cpuidle_driver *drv, + struct cpuidle_device *dev); + void (*disable) (struct cpuidle_driver *drv, + struct cpuidle_device *dev); + + int (*select) (struct cpuidle_driver *drv, + struct cpuidle_device *dev); + void (*reflect) (struct cpuidle_device *dev, int index); +}; + +#ifdef CONFIG_CPU_IDLE +extern int cpuidle_register_governor(struct cpuidle_governor *gov); +#else +static inline int cpuidle_register_governor(struct cpuidle_governor *gov) +{return 0;} +#endif + #endif /* __DRIVER_CPUIDLE_H */ diff --git a/drivers/cpuidle/governors/ladder.c b/drivers/cpuidle/governors/ladder.c index 5971342f025d..e985988e8ca4 100644 --- a/drivers/cpuidle/governors/ladder.c +++ b/drivers/cpuidle/governors/ladder.c @@ -20,6 +20,8 @@ #include <asm/io.h> #include <asm/uaccess.h> +#include "../cpuidle.h" + #define PROMOTION_COUNT 4 #define DEMOTION_COUNT 1 diff --git a/drivers/cpuidle/governors/menu.c b/drivers/cpuidle/governors/menu.c index f86c1c9ea37b..6b2eca00c610 100644 --- a/drivers/cpuidle/governors/menu.c +++ b/drivers/cpuidle/governors/menu.c @@ -20,6 +20,8 @@ #include <linux/sched.h> #include <linux/math64.h> +#include "../cpuidle.h" + /* * Please note when changing the tuning values: * If (MAX_INTERESTING-1) * RESOLUTION > UINT_MAX, the result of diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h index 35d9410b10cb..add57b8f7999 100644 --- a/include/linux/cpuidle.h +++ b/include/linux/cpuidle.h @@ -215,32 +215,6 @@ static inline void cpuidle_coupled_parallel_barrier(struct cpuidle_device *dev, } #endif -/****************************** - * CPUIDLE GOVERNOR INTERFACE * - ******************************/ - -struct cpuidle_governor { - char name[CPUIDLE_NAME_LEN]; - struct list_head governor_list; - unsigned int rating; - - int (*enable) (struct cpuidle_driver *drv, - struct cpuidle_device *dev); - void (*disable) (struct cpuidle_driver *drv, - struct cpuidle_device *dev); - - int (*select) (struct cpuidle_driver *drv, - struct cpuidle_device *dev); - void (*reflect) (struct cpuidle_device *dev, int index); -}; - -#ifdef CONFIG_CPU_IDLE -extern int cpuidle_register_governor(struct cpuidle_governor *gov); -#else -static inline int cpuidle_register_governor(struct cpuidle_governor *gov) -{return 0;} -#endif - #ifdef CONFIG_ARCH_HAS_CPU_RELAX #define CPUIDLE_DRIVER_STATE_START 1 #else |