aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-08-12 13:01:59 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-12 13:01:59 -0400
commit26df0766a73a859bb93dc58e747c5028557a23fd (patch)
tree4776de567425a7fb66ca9a87228309f9c84de633 /drivers/acpi
parent580287628cdd99366b10c9050c4479b387283be8 (diff)
parenta6de51b2787012ba3ab62c7d50df1b749b83d5f0 (diff)
Merge branch 'params' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus
* 'params' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus: (22 commits) param: don't deref arg in __same_type() checks param: update drivers/acpi/debug.c to new scheme param: use module_param in drivers/message/fusion/mptbase.c ide: use module_param_named rather than module_param_call param: update drivers/char/ipmi/ipmi_watchdog.c to new scheme param: lock if_sdio's lbs_helper_name and lbs_fw_name against sysfs changes. param: lock myri10ge_fw_name against sysfs changes. param: simple locking for sysfs-writable charp parameters param: remove unnecessary writable charp param: add kerneldoc to moduleparam.h param: locking for kernel parameters param: make param sections const. param: use free hook for charp (fix leak of charp parameters) param: add a free hook to kernel_param_ops. param: silence .init.text references from param ops Add param ops struct for hvc_iucv driver. nfs: update for module_param_named API change AppArmor: update for module_param_named API change param: use ops in struct kernel_param, rather than get and set fns directly param: move the EXPORT_SYMBOL to after the definitions. ...
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/debug.c32
1 files changed, 24 insertions, 8 deletions
diff --git a/drivers/acpi/debug.c b/drivers/acpi/debug.c
index 146135e7a6a1..295dbfa2db9c 100644
--- a/drivers/acpi/debug.c
+++ b/drivers/acpi/debug.c
@@ -96,7 +96,8 @@ static const struct acpi_dlevel acpi_debug_levels[] = {
96/* -------------------------------------------------------------------------- 96/* --------------------------------------------------------------------------
97 FS Interface (/sys) 97 FS Interface (/sys)
98 -------------------------------------------------------------------------- */ 98 -------------------------------------------------------------------------- */
99static int param_get_debug_layer(char *buffer, struct kernel_param *kp) { 99static int param_get_debug_layer(char *buffer, const struct kernel_param *kp)
100{
100 int result = 0; 101 int result = 0;
101 int i; 102 int i;
102 103
@@ -118,7 +119,8 @@ static int param_get_debug_layer(char *buffer, struct kernel_param *kp) {
118 return result; 119 return result;
119} 120}
120 121
121static int param_get_debug_level(char *buffer, struct kernel_param *kp) { 122static int param_get_debug_level(char *buffer, const struct kernel_param *kp)
123{
122 int result = 0; 124 int result = 0;
123 int i; 125 int i;
124 126
@@ -137,8 +139,18 @@ static int param_get_debug_level(char *buffer, struct kernel_param *kp) {
137 return result; 139 return result;
138} 140}
139 141
140module_param_call(debug_layer, param_set_uint, param_get_debug_layer, &acpi_dbg_layer, 0644); 142static struct kernel_param_ops acpi_debug_layer_ops = {
141module_param_call(debug_level, param_set_uint, param_get_debug_level, &acpi_dbg_level, 0644); 143 .set = param_set_uint,
144 .get = param_get_debug_layer,
145};
146
147static struct kernel_param_ops acpi_debug_level_ops = {
148 .set = param_set_uint,
149 .get = param_get_debug_level,
150};
151
152module_param_cb(debug_layer, &acpi_debug_layer_ops, &acpi_dbg_layer, 0644);
153module_param_cb(debug_level, &acpi_debug_level_ops, &acpi_dbg_level, 0644);
142 154
143static char trace_method_name[6]; 155static char trace_method_name[6];
144module_param_string(trace_method_name, trace_method_name, 6, 0644); 156module_param_string(trace_method_name, trace_method_name, 6, 0644);
@@ -147,7 +159,7 @@ module_param(trace_debug_layer, uint, 0644);
147static unsigned int trace_debug_level; 159static unsigned int trace_debug_level;
148module_param(trace_debug_level, uint, 0644); 160module_param(trace_debug_level, uint, 0644);
149 161
150static int param_set_trace_state(const char *val, struct kernel_param *kp) 162static int param_set_trace_state(const char *val, const struct kernel_param *kp)
151{ 163{
152 int result = 0; 164 int result = 0;
153 165
@@ -181,7 +193,7 @@ exit:
181 return result; 193 return result;
182} 194}
183 195
184static int param_get_trace_state(char *buffer, struct kernel_param *kp) 196static int param_get_trace_state(char *buffer, const struct kernel_param *kp)
185{ 197{
186 if (!acpi_gbl_trace_method_name) 198 if (!acpi_gbl_trace_method_name)
187 return sprintf(buffer, "disable"); 199 return sprintf(buffer, "disable");
@@ -194,8 +206,12 @@ static int param_get_trace_state(char *buffer, struct kernel_param *kp)
194 return 0; 206 return 0;
195} 207}
196 208
197module_param_call(trace_state, param_set_trace_state, param_get_trace_state, 209static struct kernel_param_ops param_ops_trace_state = {
198 NULL, 0644); 210 .set = param_set_trace_state,
211 .get = param_get_trace_state,
212};
213
214module_param_cb(trace_state, &param_ops_trace_state, NULL, 0644);
199 215
200/* -------------------------------------------------------------------------- 216/* --------------------------------------------------------------------------
201 DebugFS Interface 217 DebugFS Interface