Commit d352cb47 authored by Luis Chamberlain's avatar Luis Chamberlain Committed by Corey Minyard

ipmi: simplify sysctl registration

register_sysctl_table() is a deprecated compatibility wrapper.
register_sysctl() can do the directory creation for you so just use
that.
Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
Message-Id: <20230302204612.782387-3-mcgrof@kernel.org>
Signed-off-by: default avatarCorey Minyard <cminyard@mvista.com>
parent 2a587b9a
......@@ -659,20 +659,6 @@ static struct ctl_table ipmi_table[] = {
{ }
};
static struct ctl_table ipmi_dir_table[] = {
{ .procname = "ipmi",
.mode = 0555,
.child = ipmi_table },
{ }
};
static struct ctl_table ipmi_root_table[] = {
{ .procname = "dev",
.mode = 0555,
.child = ipmi_dir_table },
{ }
};
static struct ctl_table_header *ipmi_table_header;
#endif /* CONFIG_PROC_FS */
......@@ -689,7 +675,7 @@ static int __init ipmi_poweroff_init(void)
pr_info("Power cycle is enabled\n");
#ifdef CONFIG_PROC_FS
ipmi_table_header = register_sysctl_table(ipmi_root_table);
ipmi_table_header = register_sysctl("dev/ipmi", ipmi_table);
if (!ipmi_table_header) {
pr_err("Unable to register powercycle sysctl\n");
rv = -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment