diff options
Diffstat (limited to 'include/linux/cpuidle.h')
-rw-r--r-- | include/linux/cpuidle.h | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h index 279b1eaa8b73..3711b34dc4f9 100644 --- a/include/linux/cpuidle.h +++ b/include/linux/cpuidle.h | |||
@@ -82,13 +82,6 @@ cpuidle_set_statedata(struct cpuidle_state_usage *st_usage, void *data) | |||
82 | st_usage->driver_data = data; | 82 | st_usage->driver_data = data; |
83 | } | 83 | } |
84 | 84 | ||
85 | struct cpuidle_state_kobj { | ||
86 | struct cpuidle_state *state; | ||
87 | struct cpuidle_state_usage *state_usage; | ||
88 | struct completion kobj_unregister; | ||
89 | struct kobject kobj; | ||
90 | }; | ||
91 | |||
92 | struct cpuidle_device { | 85 | struct cpuidle_device { |
93 | unsigned int registered:1; | 86 | unsigned int registered:1; |
94 | unsigned int enabled:1; | 87 | unsigned int enabled:1; |
@@ -98,7 +91,7 @@ struct cpuidle_device { | |||
98 | int state_count; | 91 | int state_count; |
99 | struct cpuidle_state_usage states_usage[CPUIDLE_STATE_MAX]; | 92 | struct cpuidle_state_usage states_usage[CPUIDLE_STATE_MAX]; |
100 | struct cpuidle_state_kobj *kobjs[CPUIDLE_STATE_MAX]; | 93 | struct cpuidle_state_kobj *kobjs[CPUIDLE_STATE_MAX]; |
101 | 94 | struct cpuidle_driver_kobj *kobj_driver; | |
102 | struct list_head device_list; | 95 | struct list_head device_list; |
103 | struct kobject kobj; | 96 | struct kobject kobj; |
104 | struct completion kobj_unregister; | 97 | struct completion kobj_unregister; |
@@ -131,6 +124,7 @@ static inline int cpuidle_get_last_residency(struct cpuidle_device *dev) | |||
131 | struct cpuidle_driver { | 124 | struct cpuidle_driver { |
132 | const char *name; | 125 | const char *name; |
133 | struct module *owner; | 126 | struct module *owner; |
127 | int refcnt; | ||
134 | 128 | ||
135 | unsigned int power_specified:1; | 129 | unsigned int power_specified:1; |
136 | /* set to 1 to use the core cpuidle time keeping (for all states). */ | 130 | /* set to 1 to use the core cpuidle time keeping (for all states). */ |
@@ -163,6 +157,10 @@ extern int cpuidle_wrap_enter(struct cpuidle_device *dev, | |||
163 | struct cpuidle_driver *drv, int index)); | 157 | struct cpuidle_driver *drv, int index)); |
164 | extern int cpuidle_play_dead(void); | 158 | extern int cpuidle_play_dead(void); |
165 | 159 | ||
160 | extern struct cpuidle_driver *cpuidle_get_cpu_driver(struct cpuidle_device *dev); | ||
161 | extern int cpuidle_register_cpu_driver(struct cpuidle_driver *drv, int cpu); | ||
162 | extern void cpuidle_unregister_cpu_driver(struct cpuidle_driver *drv, int cpu); | ||
163 | |||
166 | #else | 164 | #else |
167 | static inline void disable_cpuidle(void) { } | 165 | static inline void disable_cpuidle(void) { } |
168 | static inline int cpuidle_idle_call(void) { return -ENODEV; } | 166 | static inline int cpuidle_idle_call(void) { return -ENODEV; } |
@@ -189,7 +187,6 @@ static inline int cpuidle_wrap_enter(struct cpuidle_device *dev, | |||
189 | struct cpuidle_driver *drv, int index)) | 187 | struct cpuidle_driver *drv, int index)) |
190 | { return -ENODEV; } | 188 | { return -ENODEV; } |
191 | static inline int cpuidle_play_dead(void) {return -ENODEV; } | 189 | static inline int cpuidle_play_dead(void) {return -ENODEV; } |
192 | |||
193 | #endif | 190 | #endif |
194 | 191 | ||
195 | #ifdef CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED | 192 | #ifdef CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED |