[PATCH] ipw2100: Fix a gcc compile warning
[linux-2.6/verdex.git] / kernel / power / power.h
blob7e8492fd142313ba4cac756274a76c8df4a66975
1 #include <linux/suspend.h>
2 #include <linux/utsname.h>
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
12 struct swsusp_info {
13 struct new_utsname uts;
14 u32 version_code;
15 unsigned long num_physpages;
16 int cpus;
17 unsigned long image_pages;
18 unsigned long pages;
19 } __attribute__((aligned(PAGE_SIZE)));
23 #ifdef CONFIG_SOFTWARE_SUSPEND
24 extern int pm_suspend_disk(void);
26 #else
27 static inline int pm_suspend_disk(void)
29 return -EPERM;
31 #endif
32 extern struct semaphore pm_sem;
33 #define power_attr(_name) \
34 static struct subsys_attribute _name##_attr = { \
35 .attr = { \
36 .name = __stringify(_name), \
37 .mode = 0644, \
38 }, \
39 .show = _name##_show, \
40 .store = _name##_store, \
43 extern struct subsystem power_subsys;
45 extern int pm_prepare_console(void);
46 extern void pm_restore_console(void);
48 /* References to section boundaries */
49 extern const void __nosave_begin, __nosave_end;
51 extern unsigned int nr_copy_pages;
52 extern struct pbe *pagedir_nosave;
54 /* Preferred image size in MB (default 500) */
55 extern unsigned int image_size;
57 extern asmlinkage int swsusp_arch_suspend(void);
58 extern asmlinkage int swsusp_arch_resume(void);
60 extern unsigned int count_data_pages(void);
61 extern void free_pagedir(struct pbe *pblist);
62 extern void release_eaten_pages(void);
63 extern struct pbe *alloc_pagedir(unsigned nr_pages, gfp_t gfp_mask, int safe_needed);
64 extern void swsusp_free(void);
65 extern int alloc_data_pages(struct pbe *pblist, gfp_t gfp_mask, int safe_needed);
66 extern unsigned int snapshot_nr_pages(void);
67 extern struct pbe *snapshot_pblist(void);
68 extern void snapshot_pblist_set(struct pbe *pblist);