Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 267081
b: refs/heads/master
c: 37cce26
h: refs/heads/master
i:
  267079: af28ad1
v: v3
  • Loading branch information
H Hartley Sweeten authored and Rafael J. Wysocki committed Oct 16, 2011
1 parent db7c5fb commit 5656c0a
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 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: 528f7ce6e439edeac38f6b3f8561f1be129b5e91
refs/heads/master: 37cce26b32142f09a8967f6d238178af654b20de
4 changes: 4 additions & 0 deletions trunk/drivers/tty/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ config VT_CONSOLE

If unsure, say Y.

config VT_CONSOLE_SLEEP
def_bool y
depends on VT_CONSOLE && PM_SLEEP

config HW_CONSOLE
bool
depends on VT && !S390 && !UML
Expand Down
9 changes: 6 additions & 3 deletions trunk/include/linux/suspend.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,18 @@
#include <linux/mm.h>
#include <asm/errno.h>

#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_VT) && defined(CONFIG_VT_CONSOLE)
#ifdef CONFIG_VT
extern void pm_set_vt_switch(int);
extern int pm_prepare_console(void);
extern void pm_restore_console(void);
#else
static inline void pm_set_vt_switch(int do_switch)
{
}
#endif

#ifdef CONFIG_VT_CONSOLE_SLEEP
extern int pm_prepare_console(void);
extern void pm_restore_console(void);
#else
static inline int pm_prepare_console(void)
{
return 0;
Expand Down
2 changes: 1 addition & 1 deletion trunk/kernel/power/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ccflags-$(CONFIG_PM_DEBUG) := -DDEBUG

obj-$(CONFIG_PM) += main.o qos.o
obj-$(CONFIG_PM_SLEEP) += console.o
obj-$(CONFIG_VT_CONSOLE_SLEEP) += console.o
obj-$(CONFIG_FREEZER) += process.o
obj-$(CONFIG_SUSPEND) += suspend.o
obj-$(CONFIG_PM_TEST_SUSPEND) += suspend_test.o
Expand Down
4 changes: 1 addition & 3 deletions trunk/kernel/power/console.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* drivers/power/process.c - Functions for saving/restoring console.
* Functions for saving/restoring console.
*
* Originally from swsusp.
*/
Expand All @@ -10,7 +10,6 @@
#include <linux/module.h>
#include "power.h"

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

static int orig_fgconsole, orig_kmsg;
Expand All @@ -32,4 +31,3 @@ void pm_restore_console(void)
vt_kmsg_redirect(orig_kmsg);
}
}
#endif

0 comments on commit 5656c0a

Please sign in to comment.