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. ...
此提交包含在:
@@ -96,7 +96,8 @@ static const struct acpi_dlevel acpi_debug_levels[] = {
|
||||
/* --------------------------------------------------------------------------
|
||||
FS Interface (/sys)
|
||||
-------------------------------------------------------------------------- */
|
||||
static int param_get_debug_layer(char *buffer, struct kernel_param *kp) {
|
||||
static int param_get_debug_layer(char *buffer, const struct kernel_param *kp)
|
||||
{
|
||||
int result = 0;
|
||||
int i;
|
||||
|
||||
@@ -118,7 +119,8 @@ static int param_get_debug_layer(char *buffer, struct kernel_param *kp) {
|
||||
return result;
|
||||
}
|
||||
|
||||
static int param_get_debug_level(char *buffer, struct kernel_param *kp) {
|
||||
static int param_get_debug_level(char *buffer, const struct kernel_param *kp)
|
||||
{
|
||||
int result = 0;
|
||||
int i;
|
||||
|
||||
@@ -137,8 +139,18 @@ static int param_get_debug_level(char *buffer, struct kernel_param *kp) {
|
||||
return result;
|
||||
}
|
||||
|
||||
module_param_call(debug_layer, param_set_uint, param_get_debug_layer, &acpi_dbg_layer, 0644);
|
||||
module_param_call(debug_level, param_set_uint, param_get_debug_level, &acpi_dbg_level, 0644);
|
||||
static struct kernel_param_ops acpi_debug_layer_ops = {
|
||||
.set = param_set_uint,
|
||||
.get = param_get_debug_layer,
|
||||
};
|
||||
|
||||
static struct kernel_param_ops acpi_debug_level_ops = {
|
||||
.set = param_set_uint,
|
||||
.get = param_get_debug_level,
|
||||
};
|
||||
|
||||
module_param_cb(debug_layer, &acpi_debug_layer_ops, &acpi_dbg_layer, 0644);
|
||||
module_param_cb(debug_level, &acpi_debug_level_ops, &acpi_dbg_level, 0644);
|
||||
|
||||
static char trace_method_name[6];
|
||||
module_param_string(trace_method_name, trace_method_name, 6, 0644);
|
||||
@@ -147,7 +159,7 @@ module_param(trace_debug_layer, uint, 0644);
|
||||
static unsigned int trace_debug_level;
|
||||
module_param(trace_debug_level, uint, 0644);
|
||||
|
||||
static int param_set_trace_state(const char *val, struct kernel_param *kp)
|
||||
static int param_set_trace_state(const char *val, const struct kernel_param *kp)
|
||||
{
|
||||
int result = 0;
|
||||
|
||||
@@ -181,7 +193,7 @@ exit:
|
||||
return result;
|
||||
}
|
||||
|
||||
static int param_get_trace_state(char *buffer, struct kernel_param *kp)
|
||||
static int param_get_trace_state(char *buffer, const struct kernel_param *kp)
|
||||
{
|
||||
if (!acpi_gbl_trace_method_name)
|
||||
return sprintf(buffer, "disable");
|
||||
@@ -194,8 +206,12 @@ static int param_get_trace_state(char *buffer, struct kernel_param *kp)
|
||||
return 0;
|
||||
}
|
||||
|
||||
module_param_call(trace_state, param_set_trace_state, param_get_trace_state,
|
||||
NULL, 0644);
|
||||
static struct kernel_param_ops param_ops_trace_state = {
|
||||
.set = param_set_trace_state,
|
||||
.get = param_get_trace_state,
|
||||
};
|
||||
|
||||
module_param_cb(trace_state, ¶m_ops_trace_state, NULL, 0644);
|
||||
|
||||
/* --------------------------------------------------------------------------
|
||||
DebugFS Interface
|
||||
|
新增問題並參考
封鎖使用者