mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 11:19:37 +00:00
ACPI: fix build warnings resulting from merge window conflict
drivers/acpi/sysfs.c:154: warning: passing argument 1 of '__check_old_set_param' from incompatible pointer type include/linux/moduleparam.h:165: note: expected 'int (*)(const char *, struct kernel_param *)' but argument is of type 'int (*)(const char *, const struct kernel_param *)' Introduced by commit1c8fce27e2
("ACPI: introduce drivers/acpi/sysfs.c") interacting with commit9bbb9e5a33
("param: use ops in struct kernel_param, rather than get and set fns directly"). Use module_param_cb instead of the obsoleted module_param_call to fix a build warning. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
parent
899611ee7d
commit
ec652b351f
1 changed files with 14 additions and 6 deletions
|
@ -100,7 +100,7 @@ static const struct acpi_dlevel acpi_debug_levels[] = {
|
||||||
ACPI_DEBUG_INIT(ACPI_LV_EVENTS),
|
ACPI_DEBUG_INIT(ACPI_LV_EVENTS),
|
||||||
};
|
};
|
||||||
|
|
||||||
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 result = 0;
|
||||||
int i;
|
int i;
|
||||||
|
@ -128,7 +128,7 @@ static int param_get_debug_layer(char *buffer, struct kernel_param *kp)
|
||||||
return result;
|
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 result = 0;
|
||||||
int i;
|
int i;
|
||||||
|
@ -149,10 +149,18 @@ static int param_get_debug_level(char *buffer, struct kernel_param *kp)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
module_param_call(debug_layer, param_set_uint, param_get_debug_layer,
|
static struct kernel_param_ops param_ops_debug_layer = {
|
||||||
&acpi_dbg_layer, 0644);
|
.set = param_set_uint,
|
||||||
module_param_call(debug_level, param_set_uint, param_get_debug_level,
|
.get = param_get_debug_layer,
|
||||||
&acpi_dbg_level, 0644);
|
};
|
||||||
|
|
||||||
|
static struct kernel_param_ops param_ops_debug_level = {
|
||||||
|
.set = param_set_uint,
|
||||||
|
.get = param_get_debug_level,
|
||||||
|
};
|
||||||
|
|
||||||
|
module_param_cb(debug_layer, ¶m_ops_debug_layer, &acpi_dbg_layer, 0644);
|
||||||
|
module_param_cb(debug_level, ¶m_ops_debug_level, &acpi_dbg_level, 0644);
|
||||||
|
|
||||||
static char trace_method_name[6];
|
static char trace_method_name[6];
|
||||||
module_param_string(trace_method_name, trace_method_name, 6, 0644);
|
module_param_string(trace_method_name, trace_method_name, 6, 0644);
|
||||||
|
|
Loading…
Reference in a new issue