Skip to content

Commit

Permalink
hv: simplify sysctl registration
Browse files Browse the repository at this point in the history
register_sysctl_table() is a deprecated compatibility wrapper.
register_sysctl() can do the directory creation for you so just use
that.

Signed-off-by: Luis Chamberlain <[email protected]>
Reviewed-by: Michael Kelley <[email protected]>
Reviewed-by: Wei Liu <[email protected]>
  • Loading branch information
mcgrof committed Apr 13, 2023
1 parent ca67405 commit 525f23f
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions drivers/hv/vmbus_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down Expand Up @@ -1547,7 +1538,7 @@ static int vmbus_bus_init(void)
* message recording won't be available in isolated
* 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)
pr_err("Hyper-V: sysctl table register error");

Expand Down

0 comments on commit 525f23f

Please sign in to comment.