[PATCH] aic7xxx_osm build fix
[cris-mirror.git] / kernel / power / power.h
blobcd6a3493cc0dc693928a907f68631b166954dfc6
1 #include <linux/suspend.h>
2 #include <linux/utsname.h>
4 /* With SUSPEND_CONSOLE defined, it 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
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)));
26 #ifdef CONFIG_SOFTWARE_SUSPEND
27 extern int pm_suspend_disk(void);
29 #else
30 static inline int pm_suspend_disk(void)
32 return -EPERM;
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, \
46 extern struct subsystem power_subsys;
48 extern int freeze_processes(void);
49 extern void thaw_processes(void);
51 extern int pm_prepare_console(void);
52 extern void pm_restore_console(void);