X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=crypto%2Finternal.h;h=c3ab4a950f304e24b8f943dc064dc7dc828a8d5e;hb=4cc7720cd165273b08a72b4193146dffee58e34b;hp=959e602909a60e1042e2d07d4d19471d9b0cd23c;hpb=9fdb62af92c741addbea15545f214a6e89460865;p=deliverable%2Flinux.git diff --git a/crypto/internal.h b/crypto/internal.h index 959e602909a6..c3ab4a950f30 100644 --- a/crypto/internal.h +++ b/crypto/internal.h @@ -12,17 +12,22 @@ */ #ifndef _CRYPTO_INTERNAL_H #define _CRYPTO_INTERNAL_H -#include + +#include #include #include #include #include #include +#include #include #include #include #include +struct crypto_instance; +struct crypto_template; + extern struct list_head crypto_alg_list; extern struct rw_semaphore crypto_alg_sem; @@ -64,9 +69,12 @@ static inline void crypto_free_hmac_block(struct crypto_tfm *tfm) #ifdef CONFIG_PROC_FS void __init crypto_init_proc(void); +void __exit crypto_exit_proc(void); #else static inline void crypto_init_proc(void) { } +static inline void crypto_exit_proc(void) +{ } #endif static inline unsigned int crypto_digest_ctxsize(struct crypto_alg *alg, @@ -108,5 +116,18 @@ void crypto_exit_digest_ops(struct crypto_tfm *tfm); void crypto_exit_cipher_ops(struct crypto_tfm *tfm); void crypto_exit_compress_ops(struct crypto_tfm *tfm); +int crypto_register_instance(struct crypto_template *tmpl, + struct crypto_instance *inst); + +static inline int crypto_tmpl_get(struct crypto_template *tmpl) +{ + return try_module_get(tmpl->module); +} + +static inline void crypto_tmpl_put(struct crypto_template *tmpl) +{ + module_put(tmpl->module); +} + #endif /* _CRYPTO_INTERNAL_H */