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 26f47d3..c3ab4a9 100644
--- a/crypto/internal.h
+++ b/crypto/internal.h
@@ -19,11 +19,15 @@
#include <linux/interrupt.h>
#include <linux/init.h>
#include <linux/list.h>
+#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/rwsem.h>
#include <linux/slab.h>
#include <asm/kmap_types.h>
+struct crypto_instance;
+struct crypto_template;
+
extern struct list_head crypto_alg_list;
extern struct rw_semaphore crypto_alg_sem;
@@ -112,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 */