Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 19986
b: refs/heads/master
c: 46cd2f3
h: refs/heads/master
v: v3
  • Loading branch information
Rafael J. Wysocki authored and Linus Torvalds committed Feb 8, 2006
1 parent cb71c11 commit b52580d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 19 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7b4fe29e00a5ab4e778bb24be86d836a25570bc9
refs/heads/master: 46cd2f32baf181b74b16cceb123bab6fe1f61f85
10 changes: 9 additions & 1 deletion trunk/include/linux/suspend.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,21 @@ extern void mark_free_pages(struct zone *zone);
#ifdef CONFIG_PM
/* kernel/power/swsusp.c */
extern int software_suspend(void);

#if defined(CONFIG_VT) && defined(CONFIG_VT_CONSOLE)
extern int pm_prepare_console(void);
extern void pm_restore_console(void);
#else
static inline int pm_prepare_console(void) { return 0; }
static inline void pm_restore_console(void) {}
#endif /* defined(CONFIG_VT) && defined(CONFIG_VT_CONSOLE) */
#else
static inline int software_suspend(void)
{
printk("Warning: fake suspend called\n");
return -EPERM;
}
#endif
#endif /* CONFIG_PM */

#ifdef CONFIG_SUSPEND_SMP
extern void disable_nonboot_cpus(void);
Expand Down
4 changes: 3 additions & 1 deletion trunk/kernel/power/console.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
#include <linux/console.h>
#include "power.h"

#ifdef SUSPEND_CONSOLE
#if defined(CONFIG_VT) && defined(CONFIG_VT_CONSOLE)
#define SUSPEND_CONSOLE (MAX_NR_CONSOLES-1)

static int orig_fgconsole, orig_kmsg;

int pm_prepare_console(void)
Expand Down
16 changes: 0 additions & 16 deletions trunk/kernel/power/power.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
#include <linux/suspend.h>
#include <linux/utsname.h>

/* With SUSPEND_CONSOLE defined suspend looks *really* cool, but
we probably do not take enough locks for switching consoles, etc,
so bad things might happen.
*/
#if defined(CONFIG_VT) && defined(CONFIG_VT_CONSOLE)
#define SUSPEND_CONSOLE (MAX_NR_CONSOLES-1)
#endif

struct swsusp_info {
struct new_utsname uts;
u32 version_code;
Expand Down Expand Up @@ -42,14 +34,6 @@ static struct subsys_attribute _name##_attr = { \

extern struct subsystem power_subsys;

#ifdef SUSPEND_CONSOLE
extern int pm_prepare_console(void);
extern void pm_restore_console(void);
#else
static int pm_prepare_console(void) { return 0; }
static void pm_restore_console(void) {}
#endif

/* References to section boundaries */
extern const void __nosave_begin, __nosave_end;

Expand Down

0 comments on commit b52580d

Please sign in to comment.