aboutsummaryrefslogtreecommitdiff
path: root/crypto/fips.c
diff options
context:
space:
mode:
authorGravatar Luis Chamberlain <mcgrof@kernel.org> 2023-03-10 15:21:50 -0800
committerGravatar Herbert Xu <herbert@gondor.apana.org.au> 2023-03-17 11:16:44 +0800
commit68629182cd54ad5cf8e501a95e2906c8eea0731c (patch)
tree9f70eb70de6d68007086d8b3538e3f1d5f5b8f7c /crypto/fips.c
parentcrypto: atmel-sha204a - Mark OF related data as maybe unused (diff)
downloadlinux-68629182cd54ad5cf8e501a95e2906c8eea0731c.tar.gz
linux-68629182cd54ad5cf8e501a95e2906c8eea0731c.tar.bz2
linux-68629182cd54ad5cf8e501a95e2906c8eea0731c.zip
crypto: fips - simplify one-level sysctl registration for crypto_sysctl_table
There is no need to declare an extra tables to just create directory, this can be easily be done with a prefix path with register_sysctl(). Simplify this registration. Signed-off-by: Luis Chamberlain <mcgrof@kernel.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/fips.c')
-rw-r--r--crypto/fips.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/crypto/fips.c b/crypto/fips.c
index b05d3c7b3ca5..92fd506abb21 100644
--- a/crypto/fips.c
+++ b/crypto/fips.c
@@ -66,20 +66,11 @@ static struct ctl_table crypto_sysctl_table[] = {
{}
};
-static struct ctl_table crypto_dir_table[] = {
- {
- .procname = "crypto",
- .mode = 0555,
- .child = crypto_sysctl_table
- },
- {}
-};
-
static struct ctl_table_header *crypto_sysctls;
static void crypto_proc_fips_init(void)
{
- crypto_sysctls = register_sysctl_table(crypto_dir_table);
+ crypto_sysctls = register_sysctl("crypto", crypto_sysctl_table);
}
static void crypto_proc_fips_exit(void)