summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Lezcano <daniel.lezcano@linaro.org>2016-12-05 10:29:42 +0100
committerDaniel Lezcano <daniel.lezcano@linaro.org>2016-12-05 11:00:02 +0100
commit9f75842fd126187ea3da6da4fabcf60a2e7f27f3 (patch)
tree7cbaf6c709b786f01ea45a85ccf2e3d9deb9c21d
parent7af5d10822522e53804c61f757d9fc9eee9ef04e (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.h26
-rw-r--r--drivers/cpuidle/governors/ladder.c2
-rw-r--r--drivers/cpuidle/governors/menu.c2
-rw-r--r--include/linux/cpuidle.h26
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 fe8f08948fcb..ea1425bfd482 100644
--- a/drivers/cpuidle/governors/ladder.c
+++ b/drivers/cpuidle/governors/ladder.c
@@ -21,6 +21,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 d9b5b9398a0f..bba3c2af9b0e 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 15deea449edc..b369043ff013 100644
--- a/include/linux/cpuidle.h
+++ b/include/linux/cpuidle.h
@@ -218,32 +218,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