diff options
Diffstat (limited to 'kernel/power/power.h')
-rw-r--r-- | kernel/power/power.h | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/kernel/power/power.h b/kernel/power/power.h index 46b5ec7a3afb..26d5a26f82e3 100644 --- a/kernel/power/power.h +++ b/kernel/power/power.h | |||
@@ -45,7 +45,7 @@ static inline char *check_image_kernel(struct swsusp_info *info) | |||
45 | */ | 45 | */ |
46 | #define SPARE_PAGES ((1024 * 1024) >> PAGE_SHIFT) | 46 | #define SPARE_PAGES ((1024 * 1024) >> PAGE_SHIFT) |
47 | 47 | ||
48 | /* kernel/power/disk.c */ | 48 | /* kernel/power/hibernate.c */ |
49 | extern int hibernation_snapshot(int platform_mode); | 49 | extern int hibernation_snapshot(int platform_mode); |
50 | extern int hibernation_restore(int platform_mode); | 50 | extern int hibernation_restore(int platform_mode); |
51 | extern int hibernation_platform_enter(void); | 51 | extern int hibernation_platform_enter(void); |
@@ -74,7 +74,7 @@ extern asmlinkage int swsusp_arch_resume(void); | |||
74 | 74 | ||
75 | extern int create_basic_memory_bitmaps(void); | 75 | extern int create_basic_memory_bitmaps(void); |
76 | extern void free_basic_memory_bitmaps(void); | 76 | extern void free_basic_memory_bitmaps(void); |
77 | extern unsigned int count_data_pages(void); | 77 | extern int swsusp_shrink_memory(void); |
78 | 78 | ||
79 | /** | 79 | /** |
80 | * Auxiliary structure used for reading the snapshot image data and | 80 | * Auxiliary structure used for reading the snapshot image data and |
@@ -147,9 +147,8 @@ extern int swsusp_swap_in_use(void); | |||
147 | */ | 147 | */ |
148 | #define SF_PLATFORM_MODE 1 | 148 | #define SF_PLATFORM_MODE 1 |
149 | 149 | ||
150 | /* kernel/power/disk.c */ | 150 | /* kernel/power/hibernate.c */ |
151 | extern int swsusp_check(void); | 151 | extern int swsusp_check(void); |
152 | extern int swsusp_shrink_memory(void); | ||
153 | extern void swsusp_free(void); | 152 | extern void swsusp_free(void); |
154 | extern int swsusp_read(unsigned int *flags_p); | 153 | extern int swsusp_read(unsigned int *flags_p); |
155 | extern int swsusp_write(unsigned int flags); | 154 | extern int swsusp_write(unsigned int flags); |
@@ -161,22 +160,36 @@ extern void swsusp_show_speed(struct timeval *, struct timeval *, | |||
161 | unsigned int, char *); | 160 | unsigned int, char *); |
162 | 161 | ||
163 | #ifdef CONFIG_SUSPEND | 162 | #ifdef CONFIG_SUSPEND |
164 | /* kernel/power/main.c */ | 163 | /* kernel/power/suspend.c */ |
164 | extern const char *const pm_states[]; | ||
165 | |||
166 | extern bool valid_state(suspend_state_t state); | ||
165 | extern int suspend_devices_and_enter(suspend_state_t state); | 167 | extern int suspend_devices_and_enter(suspend_state_t state); |
168 | extern int enter_state(suspend_state_t state); | ||
166 | #else /* !CONFIG_SUSPEND */ | 169 | #else /* !CONFIG_SUSPEND */ |
167 | static inline int suspend_devices_and_enter(suspend_state_t state) | 170 | static inline int suspend_devices_and_enter(suspend_state_t state) |
168 | { | 171 | { |
169 | return -ENOSYS; | 172 | return -ENOSYS; |
170 | } | 173 | } |
174 | static inline int enter_state(suspend_state_t state) { return -ENOSYS; } | ||
175 | static inline bool valid_state(suspend_state_t state) { return false; } | ||
171 | #endif /* !CONFIG_SUSPEND */ | 176 | #endif /* !CONFIG_SUSPEND */ |
172 | 177 | ||
178 | #ifdef CONFIG_PM_TEST_SUSPEND | ||
179 | /* kernel/power/suspend_test.c */ | ||
180 | extern void suspend_test_start(void); | ||
181 | extern void suspend_test_finish(const char *label); | ||
182 | #else /* !CONFIG_PM_TEST_SUSPEND */ | ||
183 | static inline void suspend_test_start(void) {} | ||
184 | static inline void suspend_test_finish(const char *label) {} | ||
185 | #endif /* !CONFIG_PM_TEST_SUSPEND */ | ||
186 | |||
173 | #ifdef CONFIG_PM_SLEEP | 187 | #ifdef CONFIG_PM_SLEEP |
174 | /* kernel/power/main.c */ | 188 | /* kernel/power/main.c */ |
175 | extern int pm_notifier_call_chain(unsigned long val); | 189 | extern int pm_notifier_call_chain(unsigned long val); |
176 | #endif | 190 | #endif |
177 | 191 | ||
178 | #ifdef CONFIG_HIGHMEM | 192 | #ifdef CONFIG_HIGHMEM |
179 | unsigned int count_highmem_pages(void); | ||
180 | int restore_highmem(void); | 193 | int restore_highmem(void); |
181 | #else | 194 | #else |
182 | static inline unsigned int count_highmem_pages(void) { return 0; } | 195 | static inline unsigned int count_highmem_pages(void) { return 0; } |