Skip to content

Commit 9f17a75

Browse files
committed
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>
1 parent 9adcf9d commit 9f17a75

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

drivers/xen/balloon.c

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -97,24 +97,6 @@ static struct ctl_table balloon_table[] = {
9797
{ }
9898
};
9999

100-
static struct ctl_table balloon_root[] = {
101-
{
102-
.procname = "balloon",
103-
.mode = 0555,
104-
.child = balloon_table,
105-
},
106-
{ }
107-
};
108-
109-
static struct ctl_table xen_root[] = {
110-
{
111-
.procname = "xen",
112-
.mode = 0555,
113-
.child = balloon_root,
114-
},
115-
{ }
116-
};
117-
118100
#else
119101
#define xen_hotplug_unpopulated 0
120102
#endif
@@ -747,7 +729,7 @@ static int __init balloon_init(void)
747729
#ifdef CONFIG_XEN_BALLOON_MEMORY_HOTPLUG
748730
set_online_page_callback(&xen_online_page);
749731
register_memory_notifier(&xen_memory_nb);
750-
register_sysctl_table(xen_root);
732+
register_sysctl_init("xen/balloon", balloon_table);
751733
#endif
752734

753735
balloon_add_regions();

0 commit comments

Comments
 (0)