Small refactoring needed by files from different locations.
Signed-off-by: Lukasz Luba l.luba@partner.samsung.com --- drivers/powercap/idle_inject.c | 15 +-------------- include/linux/idle_inject.h | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 16 deletions(-)
diff --git a/drivers/powercap/idle_inject.c b/drivers/powercap/idle_inject.c index 24ff2a068978..a019971ad89c 100644 --- a/drivers/powercap/idle_inject.c +++ b/drivers/powercap/idle_inject.c @@ -39,6 +39,7 @@
#include <linux/cpu.h> #include <linux/hrtimer.h> +#include <linux/idle_inject.h> #include <linux/kthread.h> #include <linux/sched.h> #include <linux/slab.h> @@ -56,20 +57,6 @@ struct idle_inject_thread { int should_run; };
-/** - * struct idle_inject_device - idle injection data - * @timer: idle injection period timer - * @idle_duration_ms: duration of CPU idle time to inject - * @run_duration_ms: duration of CPU run time to allow - * @cpumask: mask of CPUs affected by idle injection - */ -struct idle_inject_device { - struct hrtimer timer; - unsigned int idle_duration_ms; - unsigned int run_duration_ms; - unsigned long int cpumask[0]; -}; - static DEFINE_PER_CPU(struct idle_inject_thread, idle_inject_thread); static DEFINE_PER_CPU(struct idle_inject_device *, idle_inject_device);
diff --git a/include/linux/idle_inject.h b/include/linux/idle_inject.h index bdc0293fb6cb..4c60f91ef7a2 100644 --- a/include/linux/idle_inject.h +++ b/include/linux/idle_inject.h @@ -8,8 +8,19 @@ #ifndef __IDLE_INJECT_H__ #define __IDLE_INJECT_H__
-/* private idle injection device structure */ -struct idle_inject_device; +/** + * struct idle_inject_device - idle injection data + * @timer: idle injection period timer + * @idle_duration_ms: duration of CPU idle time to inject + * @run_duration_ms: duration of CPU run time to allow + * @cpumask: mask of CPUs affected by idle injection + */ +struct idle_inject_device { + struct hrtimer timer; + unsigned int idle_duration_ms; + unsigned int run_duration_ms; + unsigned long int cpumask[0]; +};
struct idle_inject_device *idle_inject_register(struct cpumask *cpumask);