diff options
Diffstat (limited to 'crypto/internal.h')
-rw-r--r-- | crypto/internal.h | 17 |
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 | ||
28 | struct crypto_instance; | ||
29 | struct crypto_template; | ||
30 | |||
27 | extern struct list_head crypto_alg_list; | 31 | extern struct list_head crypto_alg_list; |
28 | extern struct rw_semaphore crypto_alg_sem; | 32 | extern struct rw_semaphore crypto_alg_sem; |
29 | 33 | ||
@@ -112,5 +116,18 @@ void crypto_exit_digest_ops(struct crypto_tfm *tfm); | |||
112 | void crypto_exit_cipher_ops(struct crypto_tfm *tfm); | 116 | void crypto_exit_cipher_ops(struct crypto_tfm *tfm); |
113 | void crypto_exit_compress_ops(struct crypto_tfm *tfm); | 117 | void crypto_exit_compress_ops(struct crypto_tfm *tfm); |
114 | 118 | ||
119 | int crypto_register_instance(struct crypto_template *tmpl, | ||
120 | struct crypto_instance *inst); | ||
121 | |||
122 | static inline int crypto_tmpl_get(struct crypto_template *tmpl) | ||
123 | { | ||
124 | return try_module_get(tmpl->module); | ||
125 | } | ||
126 | |||
127 | static 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 | ||