From 176c3652c544b6f8d4bb1984c58c10080f45dbf0 Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Wed, 6 Jul 2005 13:53:09 -0700 Subject: [CRYPTO] Make crypto_alg_lookup static This patch makes a needlessly global function static. Signed-off-by: Adrian Bunk Signed-off-by: Herbert Xu Signed-off-by: David S. Miller --- crypto/api.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'crypto/api.c') diff --git a/crypto/api.c b/crypto/api.c index f55856b2199..0b583d24f7f 100644 --- a/crypto/api.c +++ b/crypto/api.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include "internal.h" @@ -33,7 +34,7 @@ static inline void crypto_alg_put(struct crypto_alg *alg) module_put(alg->cra_module); } -struct crypto_alg *crypto_alg_lookup(const char *name) +static struct crypto_alg *crypto_alg_lookup(const char *name) { struct crypto_alg *q, *alg = NULL; @@ -54,6 +55,13 @@ struct crypto_alg *crypto_alg_lookup(const char *name) return alg; } +/* A far more intelligent version of this is planned. For now, just + * try an exact match on the name of the algorithm. */ +static inline struct crypto_alg *crypto_alg_mod_lookup(const char *name) +{ + return try_then_request_module(crypto_alg_lookup(name), name); +} + static int crypto_init_flags(struct crypto_tfm *tfm, u32 flags) { tfm->crt_flags = 0; -- cgit v1.2.3