ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / kernel / power / power.h
1
2
3 /* With SUSPEND_CONSOLE defined, it suspend looks *really* cool, but
4    we probably do not take enough locks for switching consoles, etc,
5    so bad things might happen.
6 */
7 #if defined(CONFIG_VT) && defined(CONFIG_VT_CONSOLE)
8 #define SUSPEND_CONSOLE (MAX_NR_CONSOLES-1)
9 #endif
10
11
12 #ifdef CONFIG_PM_DISK
13 extern int pm_suspend_disk(void);
14
15 #else
16 static inline int pm_suspend_disk(void)
17 {
18         return -EPERM;
19 }
20 #endif
21
22 extern struct semaphore pm_sem;
23 #define power_attr(_name) \
24 static struct subsys_attribute _name##_attr = { \
25         .attr   = {                             \
26                 .name = __stringify(_name),     \
27                 .mode = 0644,                   \
28         },                                      \
29         .show   = _name##_show,                 \
30         .store  = _name##_store,                \
31 }
32
33 extern struct subsystem power_subsys;
34
35 extern int freeze_processes(void);
36 extern void thaw_processes(void);
37
38 extern int pm_prepare_console(void);
39 extern void pm_restore_console(void);