aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/internal.h')
-rw-r--r--crypto/internal.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/crypto/internal.h b/crypto/internal.h
index 26f47d331551..c3ab4a950f30 100644
--- a/crypto/internal.h
+++ b/crypto/internal.h
@@ -19,11 +19,15 @@
19#include <linux/interrupt.h> 19#include <linux/interrupt.h>
20#include <linux/init.h> 20#include <linux/init.h>
21#include <linux/list.h> 21#include <linux/list.h>
22#include <linux/module.h>
22#include <linux/kernel.h> 23#include <linux/kernel.h>
23#include <linux/rwsem.h> 24#include <linux/rwsem.h>
24#include <linux/slab.h> 25#include <linux/slab.h>
25#include <asm/kmap_types.h> 26#include <asm/kmap_types.h>
26 27
28struct crypto_instance;
29struct crypto_template;
30
27extern struct list_head crypto_alg_list; 31extern struct list_head crypto_alg_list;
28extern struct rw_semaphore crypto_alg_sem; 32extern struct rw_semaphore crypto_alg_sem;
29 33
@@ -112,5 +116,18 @@ void crypto_exit_digest_ops(struct crypto_tfm *tfm);
112void crypto_exit_cipher_ops(struct crypto_tfm *tfm); 116void crypto_exit_cipher_ops(struct crypto_tfm *tfm);
113void crypto_exit_compress_ops(struct crypto_tfm *tfm); 117void crypto_exit_compress_ops(struct crypto_tfm *tfm);
114 118
119int crypto_register_instance(struct crypto_template *tmpl,
120 struct crypto_instance *inst);
121
122static inline int crypto_tmpl_get(struct crypto_template *tmpl)
123{
124 return try_module_get(tmpl->module);
125}
126
127static inline void crypto_tmpl_put(struct crypto_template *tmpl)
128{
129 module_put(tmpl->module);
130}
131
115#endif /* _CRYPTO_INTERNAL_H */ 132#endif /* _CRYPTO_INTERNAL_H */
116 133