aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sysctl.c
diff options
context:
space:
mode:
authorBart Samwel <bart@samwel.tk>2006-03-24 06:15:49 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-24 10:33:20 -0500
commited5b43f15a8e86e3ae939b98bc161ee973ecedf2 (patch)
treedcd5bc0b5817d6452b0897a08293317f470f4db9 /kernel/sysctl.c
parentf6ef943813ac3085ece7252ea101d663581219f6 (diff)
[PATCH] Represent laptop_mode as jiffies internally
Make that the internal value for /proc/sys/vm/laptop_mode is stored as jiffies instead of seconds. Let the sysctl interface do the conversions, instead of doing on-the-fly conversions every time the value is used. Add a description of the fact that laptop_mode doubles as a flag and a timeout to the comment above the laptop_mode variable. Signed-off-by: Bart Samwel <bart@samwel.tk> 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.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 817ba25517eb..d13426680d10 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -848,9 +848,8 @@ static ctl_table vm_table[] = {
848 .data = &laptop_mode, 848 .data = &laptop_mode,
849 .maxlen = sizeof(laptop_mode), 849 .maxlen = sizeof(laptop_mode),
850 .mode = 0644, 850 .mode = 0644,
851 .proc_handler = &proc_dointvec, 851 .proc_handler = &proc_dointvec_jiffies,
852 .strategy = &sysctl_intvec, 852 .strategy = &sysctl_jiffies,
853 .extra1 = &zero,
854 }, 853 },
855 { 854 {
856 .ctl_name = VM_BLOCK_DUMP, 855 .ctl_name = VM_BLOCK_DUMP,