diff options
author | Luis Chamberlain <mcgrof@kernel.org> | 2023-03-02 12:46:06 -0800 |
---|---|---|
committer | Luis Chamberlain <mcgrof@kernel.org> | 2023-04-13 11:49:20 -0700 |
commit | ca674057f36bcc42eea3832b8de5d0582615a472 (patch) | |
tree | cc2cb97b90fd51a67a7a45c0a7d63e93c94a13e3 /drivers/scsi/scsi_sysctl.c | |
parent | adf11ea8725bd7874b4aec6990c5807abcd5a00d (diff) | |
download | linux-stable-ca674057f36bcc42eea3832b8de5d0582615a472.tar.gz linux-stable-ca674057f36bcc42eea3832b8de5d0582615a472.tar.bz2 linux-stable-ca674057f36bcc42eea3832b8de5d0582615a472.zip |
scsi: simplify sysctl registration with register_sysctl()
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>
Diffstat (limited to 'drivers/scsi/scsi_sysctl.c')
-rw-r--r-- | drivers/scsi/scsi_sysctl.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/drivers/scsi/scsi_sysctl.c b/drivers/scsi/scsi_sysctl.c index 7259704a7f52..7f0914ea168f 100644 --- a/drivers/scsi/scsi_sysctl.c +++ b/drivers/scsi/scsi_sysctl.c @@ -21,25 +21,11 @@ static struct ctl_table scsi_table[] = { { } }; -static struct ctl_table scsi_dir_table[] = { - { .procname = "scsi", - .mode = 0555, - .child = scsi_table }, - { } -}; - -static struct ctl_table scsi_root_table[] = { - { .procname = "dev", - .mode = 0555, - .child = scsi_dir_table }, - { } -}; - static struct ctl_table_header *scsi_table_header; int __init scsi_init_sysctl(void) { - scsi_table_header = register_sysctl_table(scsi_root_table); + scsi_table_header = register_sysctl("dev/scsi", scsi_table); if (!scsi_table_header) return -ENOMEM; return 0; |