From: Luis Chamberlain Date: Thu, 2 Mar 2023 20:46:08 +0000 (-0800) Subject: hv: simplify sysctl registration X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=525f23fe58b59b3a78a7044916aed9fe26918296;p=linux.git 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 Reviewed-by: Michael Kelley Reviewed-by: Wei Liu --- diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index d24dd65b33d4d..229353f1e9c29 100644 --- a/drivers/hv/vmbus_drv.c +++ b/drivers/hv/vmbus_drv.c @@ -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");