idle_inject: move needed structure to header file
authorLukasz Luba <l.luba@partner.samsung.com>
Tue, 30 Oct 2018 12:20:28 +0000 (13:20 +0100)
committerLukasz Luba <l.luba@partner.samsung.com>
Fri, 17 May 2019 07:15:39 +0000 (09:15 +0200)
Small refactoring needed by files from different locations.

Signed-off-by: Lukasz Luba <l.luba@partner.samsung.com>
drivers/powercap/idle_inject.c
include/linux/idle_inject.h

index 24ff2a068978a17182e5e1511905cbe53c4e1199..a019971ad89c979801676adf06d4280ece55dfe2 100644 (file)
@@ -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);
 
index bdc0293fb6cb702a2107ce98ba74984a901f4582..4c60f91ef7a227c122822b8ba7d99722e85088cf 100644 (file)
@@ -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);