summaryrefslogtreecommitdiff
path: root/drivers/xen
diff options
context:
space:
mode:
authorLuis Chamberlain <mcgrof@kernel.org>2023-03-02 23:46:12 +0300
committerLuis Chamberlain <mcgrof@kernel.org>2023-04-13 21:49:20 +0300
commit9f17a75b2d10ddd786b3b2c4fd732356de4f483e (patch)
tree137752f547e9f75ff5893bca6e9c9427a5dafed3 /drivers/xen
parent9adcf9d3d5c9ed6bb9d493b59594501f79ae3bed (diff)
downloadlinux-9f17a75b2d10ddd786b3b2c4fd732356de4f483e.tar.xz
xen: simplify sysctl registration for balloon
register_sysctl_table() is a deprecated compatibility wrapper. register_sysctl_init() can do the directory creation for you so just use that. Signed-off-by: Luis Chamberlain <mcgrof@kernel.org> Reviewed-by: Juergen Gross <jgross@suse.com>
Diffstat (limited to 'drivers/xen')
-rw-r--r--drivers/xen/balloon.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c
index 617a7f4f07a8..586a1673459e 100644
--- a/drivers/xen/balloon.c
+++ b/drivers/xen/balloon.c
@@ -97,24 +97,6 @@ static struct ctl_table balloon_table[] = {
{ }
};
-static struct ctl_table balloon_root[] = {
- {
- .procname = "balloon",
- .mode = 0555,
- .child = balloon_table,
- },
- { }
-};
-
-static struct ctl_table xen_root[] = {
- {
- .procname = "xen",
- .mode = 0555,
- .child = balloon_root,
- },
- { }
-};
-
#else
#define xen_hotplug_unpopulated 0
#endif
@@ -747,7 +729,7 @@ static int __init balloon_init(void)
#ifdef CONFIG_XEN_BALLOON_MEMORY_HOTPLUG
set_online_page_callback(&xen_online_page);
register_memory_notifier(&xen_memory_nb);
- register_sysctl_table(xen_root);
+ register_sysctl_init("xen/balloon", balloon_table);
#endif
balloon_add_regions();