Skip to content

Commit

Permalink
xen: simplify sysctl registration for balloon
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Juergen Gross <[email protected]>
  • Loading branch information
mcgrof committed Apr 13, 2023
1 parent 9adcf9d commit 9f17a75
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions drivers/xen/balloon.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 9f17a75

Please sign in to comment.