summaryrefslogtreecommitdiffstats
path: root/include/crypto
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2008-09-14 03:19:03 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2008-12-25 01:01:23 +0100
commit4a7794860ba2b56693b1d89fd485fd08cdc763e3 (patch)
treed97f46fe980ac79e226b429a61c5328fae9bf882 /include/crypto
parentcrypto: ansi_cprng - Allow resetting of DT value (diff)
downloadlinux-4a7794860ba2b56693b1d89fd485fd08cdc763e3.tar.xz
linux-4a7794860ba2b56693b1d89fd485fd08cdc763e3.zip
crypto: api - Move type exit function into crypto_tfm
The type exit function needs to undo any allocations done by the type init function. However, the type init function may differ depending on the upper-level type of the transform (e.g., a crypto_blkcipher instantiated as a crypto_ablkcipher). So we need to move the exit function out of the lower-level structure and into crypto_tfm itself. As it stands this is a no-op since nobody uses exit functions at all. However, all cases where a lower-level type is instantiated as a different upper-level type (such as blkcipher as ablkcipher) will be converted such that they allocate the underlying transform and use that instead of casting (e.g., crypto_ablkcipher casted into crypto_blkcipher). That will need to use a different exit function depending on the upper-level type. This patch also allows the type init/exit functions to call (or not) cra_init/cra_exit instead of always calling them from the top level. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/crypto')
-rw-r--r--include/crypto/algapi.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/include/crypto/algapi.h b/include/crypto/algapi.h
index 60d06e784be3..5fb6d8618d4d 100644
--- a/include/crypto/algapi.h
+++ b/include/crypto/algapi.h
@@ -23,7 +23,6 @@ struct seq_file;
struct crypto_type {
unsigned int (*ctxsize)(struct crypto_alg *alg, u32 type, u32 mask);
int (*init)(struct crypto_tfm *tfm, u32 type, u32 mask);
- void (*exit)(struct crypto_tfm *tfm);
void (*show)(struct seq_file *m, struct crypto_alg *alg);
};