[PATCH] swsusp: fix comments
[linux-2.6.git] / kernel / power / power.h
1 #include <linux/suspend.h>
2 #include <linux/utsname.h>
3
4 /* With SUSPEND_CONSOLE defined suspend looks *really* cool, but
5    we probably do not take enough locks for switching consoles, etc,
6    so bad things might happen.
7 */
8 #if defined(CONFIG_VT) && defined(CONFIG_VT_CONSOLE)
9 #define SUSPEND_CONSOLE (MAX_NR_CONSOLES-1)
10 #endif
11
12
13 struct swsusp_info {
14         struct new_utsname      uts;
15         u32                     version_code;
16         unsigned long           num_physpages;
17         int                     cpus;
18         unsigned long           image_pages;
19         unsigned long           pagedir_pages;
20         suspend_pagedir_t       * suspend_pagedir;
21         swp_entry_t             pagedir[768];
22 } __attribute__((aligned(PAGE_SIZE)));
23
24
25
26 #ifdef CONFIG_SOFTWARE_SUSPEND
27 extern int pm_suspend_disk(void);
28
29 #else
30 static inline int pm_suspend_disk(void)
31 {
32         return -EPERM;
33 }
34 #endif
35 extern struct semaphore pm_sem;
36 #define power_attr(_name) \
37 static struct subsys_attribute _name##_attr = { \
38         .attr   = {                             \
39                 .name = __stringify(_name),     \
40                 .mode = 0644,                   \
41         },                                      \
42         .show   = _name##_show,                 \
43         .store  = _name##_store,                \
44 }
45
46 extern struct subsystem power_subsys;
47
48 extern int freeze_processes(void);
49 extern void thaw_processes(void);
50
51 extern int pm_prepare_console(void);
52 extern void pm_restore_console(void);