[CRYPTO] Make crypto_alg_lookup static This patch makes a needlessly global function static.
Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]> Signed-off-by: Herbert Xu <[EMAIL PROTECTED]> --- crypto/api.c | 10 +++++++++- crypto/internal.h | 10 ---------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/crypto/api.c b/crypto/api.c --- a/crypto/api.c +++ b/crypto/api.c @@ -16,6 +16,7 @@ #include <linux/init.h> #include <linux/crypto.h> #include <linux/errno.h> +#include <linux/kmod.h> #include <linux/rwsem.h> #include <linux/slab.h> #include "internal.h" @@ -33,7 +34,7 @@ static inline void crypto_alg_put(struct 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(con 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; diff --git a/crypto/internal.h b/crypto/internal.h --- a/crypto/internal.h +++ b/crypto/internal.h @@ -16,7 +16,6 @@ #include <linux/highmem.h> #include <linux/interrupt.h> #include <linux/init.h> -#include <linux/kmod.h> #include <asm/kmap_types.h> extern enum km_type crypto_km_types[]; @@ -42,15 +41,6 @@ static inline void crypto_yield(struct c cond_resched(); } -struct crypto_alg *crypto_alg_lookup(const char *name); - -/* 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); -} - #ifdef CONFIG_CRYPTO_HMAC int crypto_alloc_hmac_block(struct crypto_tfm *tfm); void crypto_free_hmac_block(struct crypto_tfm *tfm); - To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html