Commit 525f23fe authored by Luis Chamberlain's avatar Luis Chamberlain

hv: 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>
Reviewed-by: default avatarMichael Kelley <mikelley@microsoft.com>
Reviewed-by: default avatarWei Liu <wei.liu@kernel.org>
parent ca674057
...@@ -1460,15 +1460,6 @@ static struct ctl_table hv_ctl_table[] = { ...@@ -1460,15 +1460,6 @@ static struct ctl_table hv_ctl_table[] = {
{} {}
}; };
static struct ctl_table hv_root_table[] = {
{
.procname = "kernel",
.mode = 0555,
.child = hv_ctl_table
},
{}
};
/* /*
* vmbus_bus_init -Main vmbus driver initialization routine. * vmbus_bus_init -Main vmbus driver initialization routine.
* *
...@@ -1547,7 +1538,7 @@ static int vmbus_bus_init(void) ...@@ -1547,7 +1538,7 @@ static int vmbus_bus_init(void)
* message recording won't be available in isolated * message recording won't be available in isolated
* guests should the following registration fail. * guests should the following registration fail.
*/ */
hv_ctl_table_hdr = register_sysctl_table(hv_root_table); hv_ctl_table_hdr = register_sysctl("kernel", hv_ctl_table);
if (!hv_ctl_table_hdr) if (!hv_ctl_table_hdr)
pr_err("Hyper-V: sysctl table register error"); pr_err("Hyper-V: sysctl table register error");
......
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