summaryrefslogtreecommitdiff
path: root/crypto/compress.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2006-05-16 22:09:29 +1000
committerHerbert Xu <herbert@gondor.apana.org.au>2006-06-26 17:34:39 +1000
commit4cf87f10628e3b8a8fb192632ef23ca022e77420 (patch)
treeb91814eeed5dbc7cae63912c25a8a1b44488bb41 /crypto/compress.c
parent486e83663a87a2b4ac4441032e2da4ce7833c510 (diff)
downloadlinux-crypto-4cf87f10628e3b8a8fb192632ef23ca022e77420.tar.gz
linux-crypto-4cf87f10628e3b8a8fb192632ef23ca022e77420.zip
[CRYPTO] all: Pass tfm instead of ctx to algorithms
Up until now algorithms have been happy to get a context pointer since they know everything that's in the tfm already (e.g., alignment, block size). However, once we have parameterised algorithms, such information will be specific to each tfm. So the algorithm API needs to be changed to pass the tfm structure instead of the context pointer. This patch is basically a text substitution. The only tricky bit is the assembly routines that need to get the context pointer offset through asm-offsets.h. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/compress.c')
-rw-r--r--crypto/compress.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/crypto/compress.c b/crypto/compress.c
index eb36d936..c12fc0c4 100644
--- a/crypto/compress.c
+++ b/crypto/compress.c
@@ -22,8 +22,7 @@ static int crypto_compress(struct crypto_tfm *tfm,
const u8 *src, unsigned int slen,
u8 *dst, unsigned int *dlen)
{
- return tfm->__crt_alg->cra_compress.coa_compress(crypto_tfm_ctx(tfm),
- src, slen, dst,
+ return tfm->__crt_alg->cra_compress.coa_compress(tfm, src, slen, dst,
dlen);
}
@@ -31,8 +30,7 @@ static int crypto_decompress(struct crypto_tfm *tfm,
const u8 *src, unsigned int slen,
u8 *dst, unsigned int *dlen)
{
- return tfm->__crt_alg->cra_compress.coa_decompress(crypto_tfm_ctx(tfm),
- src, slen, dst,
+ return tfm->__crt_alg->cra_compress.coa_decompress(tfm, src, slen, dst,
dlen);
}