diff options
author | Matthew Garrett <mjg@redhat.com> | 2010-05-28 16:32:14 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2010-06-10 11:02:34 -0400 |
commit | dd4c4f17d722ffeb2515bf781400675a30fcead7 (patch) | |
tree | 0190eff340ffeac7800a3d7d1e0c1232c09397ef /include | |
parent | 67a3e12b05e055c0415c556a315a3d3eb637e29e (diff) |
suspend: Move NVS save/restore code to generic suspend functionality
Saving platform non-volatile state may be required for suspend to RAM as
well as hibernation. Move it to more generic code.
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Tested-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/suspend.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/include/linux/suspend.h b/include/linux/suspend.h index 5e781d824e6d..bc7d6bb4cd8e 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h | |||
@@ -256,22 +256,22 @@ static inline int hibernate(void) { return -ENOSYS; } | |||
256 | static inline bool system_entering_hibernation(void) { return false; } | 256 | static inline bool system_entering_hibernation(void) { return false; } |
257 | #endif /* CONFIG_HIBERNATION */ | 257 | #endif /* CONFIG_HIBERNATION */ |
258 | 258 | ||
259 | #ifdef CONFIG_HIBERNATION_NVS | 259 | #ifdef CONFIG_SUSPEND_NVS |
260 | extern int hibernate_nvs_register(unsigned long start, unsigned long size); | 260 | extern int suspend_nvs_register(unsigned long start, unsigned long size); |
261 | extern int hibernate_nvs_alloc(void); | 261 | extern int suspend_nvs_alloc(void); |
262 | extern void hibernate_nvs_free(void); | 262 | extern void suspend_nvs_free(void); |
263 | extern void hibernate_nvs_save(void); | 263 | extern void suspend_nvs_save(void); |
264 | extern void hibernate_nvs_restore(void); | 264 | extern void suspend_nvs_restore(void); |
265 | #else /* CONFIG_HIBERNATION_NVS */ | 265 | #else /* CONFIG_SUSPEND_NVS */ |
266 | static inline int hibernate_nvs_register(unsigned long a, unsigned long b) | 266 | static inline int suspend_nvs_register(unsigned long a, unsigned long b) |
267 | { | 267 | { |
268 | return 0; | 268 | return 0; |
269 | } | 269 | } |
270 | static inline int hibernate_nvs_alloc(void) { return 0; } | 270 | static inline int suspend_nvs_alloc(void) { return 0; } |
271 | static inline void hibernate_nvs_free(void) {} | 271 | static inline void suspend_nvs_free(void) {} |
272 | static inline void hibernate_nvs_save(void) {} | 272 | static inline void suspend_nvs_save(void) {} |
273 | static inline void hibernate_nvs_restore(void) {} | 273 | static inline void suspend_nvs_restore(void) {} |
274 | #endif /* CONFIG_HIBERNATION_NVS */ | 274 | #endif /* CONFIG_SUSPEND_NVS */ |
275 | 275 | ||
276 | #ifdef CONFIG_PM_SLEEP | 276 | #ifdef CONFIG_PM_SLEEP |
277 | void save_processor_state(void); | 277 | void save_processor_state(void); |