[PATCH] swsusp: add check for suspension of X-controlled devices

It is unsafe to suspend devices if the hardware is controlled by X.  Add an
extra check to prevent this from happening.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Rafael J. Wysocki 2006-03-23 03:00:07 -08:00 committed by Linus Torvalds
parent e4e4d66556
commit ff4da2e262
3 changed files with 17 additions and 1 deletions

View file

@ -73,6 +73,11 @@ int con_copy_unimap(struct vc_data *dst_vc, struct vc_data *src_vc);
int vt_waitactive(int vt);
void change_console(struct vc_data *new_vc);
void reset_vc(struct vc_data *vc);
#ifdef CONFIG_VT
int is_console_suspend_safe(void);
#else
static inline int is_console_suspend_safe(void) { return 1; }
#endif
/*
* vc_screen.c shares this temporary buffer with the console write code so that