diff options
author | Luis Chamberlain <mcgrof@kernel.org> | 2023-03-02 21:46:09 +0100 |
---|---|---|
committer | Luis Chamberlain <mcgrof@kernel.org> | 2023-04-13 20:49:20 +0200 |
commit | 9adcf9d3d5c9ed6bb9d493b59594501f79ae3bed (patch) | |
tree | 55cbb5400fadbb961d7968aa1c19dfce8700fe34 /drivers/md | |
parent | hv: simplify sysctl registration (diff) | |
download | linux-9adcf9d3d5c9ed6bb9d493b59594501f79ae3bed.tar.xz linux-9adcf9d3d5c9ed6bb9d493b59594501f79ae3bed.zip |
md: 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>
Acked-by: Song Liu <song@kernel.org>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/md.c | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index 39e49e5d7182..0dc01f834b62 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -322,26 +322,6 @@ static struct ctl_table raid_table[] = { { } }; -static struct ctl_table raid_dir_table[] = { - { - .procname = "raid", - .maxlen = 0, - .mode = S_IRUGO|S_IXUGO, - .child = raid_table, - }, - { } -}; - -static struct ctl_table raid_root_table[] = { - { - .procname = "dev", - .maxlen = 0, - .mode = 0555, - .child = raid_dir_table, - }, - { } -}; - static int start_readonly; /* @@ -9649,7 +9629,7 @@ static int __init md_init(void) mdp_major = ret; register_reboot_notifier(&md_notifier); - raid_table_header = register_sysctl_table(raid_root_table); + raid_table_header = register_sysctl("dev/raid", raid_table); md_geninit(); return 0; |