aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sysctl.c
diff options
context:
space:
mode:
authorPavel Machek <pavel@ucw.cz>2006-02-20 21:27:58 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-02-20 23:00:10 -0500
commitc255d844dd73616f23e4b4733edcc2e5fa4042b2 (patch)
tree33665c47a67c3e168095e13329e71c6b5d18fd4d /kernel/sysctl.c
parent6303dbf570e410067380daec670fdb4137ac0d1d (diff)
[PATCH] suspend-to-ram: allow video options to be set at runtime
Currently, acpi video options can only be set on kernel command line. That's little inflexible; I'd like userland s2ram application that just works, and modifying kernel command line according to whitelist is not fun. It is better to just allow s2ram application to set video options just before suspend (according to the whitelist). This implements sysctl to allow setting suspend video options without reboot. (akpm: Documentation updates for this new sysctl are pending..) Signed-off-by: Pavel Machek <pavel@suse.cz> Cc: "Brown, Len" <len.brown@intel.com> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r--kernel/sysctl.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 7654d55c47f5..ebc41bf22f1e 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -44,14 +44,12 @@
44#include <linux/limits.h> 44#include <linux/limits.h>
45#include <linux/dcache.h> 45#include <linux/dcache.h>
46#include <linux/syscalls.h> 46#include <linux/syscalls.h>
47#include <linux/nfs_fs.h>
48#include <linux/acpi.h>
47 49
48#include <asm/uaccess.h> 50#include <asm/uaccess.h>
49#include <asm/processor.h> 51#include <asm/processor.h>
50 52
51#ifdef CONFIG_ROOT_NFS
52#include <linux/nfs_fs.h>
53#endif
54
55#if defined(CONFIG_SYSCTL) 53#if defined(CONFIG_SYSCTL)
56 54
57/* External variables not in a header file. */ 55/* External variables not in a header file. */
@@ -656,6 +654,16 @@ static ctl_table kern_table[] = {
656 .proc_handler = &proc_dointvec, 654 .proc_handler = &proc_dointvec,
657 }, 655 },
658#endif 656#endif
657#ifdef CONFIG_ACPI_SLEEP
658 {
659 .ctl_name = KERN_ACPI_VIDEO_FLAGS,
660 .procname = "acpi_video_flags",
661 .data = &acpi_video_flags,
662 .maxlen = sizeof (unsigned long),
663 .mode = 0644,
664 .proc_handler = &proc_dointvec,
665 },
666#endif
659 { .ctl_name = 0 } 667 { .ctl_name = 0 }
660}; 668};
661 669