mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-15 15:04:27 +08:00
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: Luis Chamberlain <mcgrof@kernel.org> Reviewed-by: Michael Kelley <mikelley@microsoft.com> Reviewed-by: Wei Liu <wei.liu@kernel.org>
This commit is contained in:
parent
ca674057f3
commit
525f23fe58
@ -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.
|
||||
*
|
||||
@ -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");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user