aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/suspend.h
diff options
context:
space:
mode:
authorH Hartley Sweeten <hartleys@visionengravers.com>2011-09-21 16:47:55 -0400
committerRafael J. Wysocki <rjw@sisk.pl>2011-10-16 17:28:51 -0400
commit37cce26b32142f09a8967f6d238178af654b20de (patch)
treee1184828f0a9e7dfd0609793fa5ec0638731ca4b /include/linux/suspend.h
parent528f7ce6e439edeac38f6b3f8561f1be129b5e91 (diff)
PM / VT: Cleanup #if defined uglyness and fix compile error
Introduce the config option CONFIG_VT_CONSOLE_SLEEP in order to cleanup the #if defined ugliness for the vt suspend support functions. Note that CONFIG_VT_CONSOLE is already dependant on CONFIG_VT. The function pm_set_vt_switch is actually dependant on CONFIG_VT and not CONFIG_PM_SLEEP. This fixes a compile error when CONFIG_PM_SLEEP is not set: drivers/tty/vt/vt_ioctl.c:1794: error: redefinition of 'pm_set_vt_switch' include/linux/suspend.h:17: error: previous definition of 'pm_set_vt_switch' was here Also, remove the incorrect path from the comment in console.c. [rjw: Replaced #if defined() with #ifdef in suspend.h.] Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'include/linux/suspend.h')
-rw-r--r--include/linux/suspend.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/linux/suspend.h b/include/linux/suspend.h
index 46f3548aef2d..57a692432f8a 100644
--- a/include/linux/suspend.h
+++ b/include/linux/suspend.h
@@ -8,15 +8,18 @@
8#include <linux/mm.h> 8#include <linux/mm.h>
9#include <asm/errno.h> 9#include <asm/errno.h>
10 10
11#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_VT) && defined(CONFIG_VT_CONSOLE) 11#ifdef CONFIG_VT
12extern void pm_set_vt_switch(int); 12extern void pm_set_vt_switch(int);
13extern int pm_prepare_console(void);
14extern void pm_restore_console(void);
15#else 13#else
16static inline void pm_set_vt_switch(int do_switch) 14static inline void pm_set_vt_switch(int do_switch)
17{ 15{
18} 16}
17#endif
19 18
19#ifdef CONFIG_VT_CONSOLE_SLEEP
20extern int pm_prepare_console(void);
21extern void pm_restore_console(void);
22#else
20static inline int pm_prepare_console(void) 23static inline int pm_prepare_console(void)
21{ 24{
22 return 0; 25 return 0;