X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Flinux%2Fcrypto.h;h=d88bf8aa8b4776c736ab5500679b71683f973c03;hb=987b0145d94eecf292d8b301228356f44611ab7c;hp=4484f5e08ac615a417621e56e2a231e3f33f4d5a;hpb=f7ed79d23a47594e7834d66a8f14449796d4f3e6;p=linux-2.6.git diff --git a/include/linux/crypto.h b/include/linux/crypto.h index 4484f5e08..d88bf8aa8 100644 --- a/include/linux/crypto.h +++ b/include/linux/crypto.h @@ -195,8 +195,6 @@ struct digest_tfm { void (*dit_init)(struct crypto_tfm *tfm); void (*dit_update)(struct crypto_tfm *tfm, struct scatterlist *sg, unsigned int nsg); - void (*dit_update_kernel)(struct crypto_tfm *tfm, - const void *data, size_t count); void (*dit_final)(struct crypto_tfm *tfm, u8 *out); void (*dit_digest)(struct crypto_tfm *tfm, struct scatterlist *sg, unsigned int nsg, u8 *out); @@ -231,8 +229,6 @@ struct crypto_tfm { } crt_u; struct crypto_alg *__crt_alg; - - char __crt_ctx[] __attribute__ ((__aligned__)); }; /* @@ -245,14 +241,10 @@ struct crypto_tfm { * will then attempt to load a module of the same name or alias. A refcount * is grabbed on the algorithm which is then associated with the new transform. * - * crypto_alloc_tfm2() is similar, but allows module loading to be suppressed. - * * crypto_free_tfm() frees up the transform and any associated resources, * then drops the refcount on the associated algorithm. */ struct crypto_tfm *crypto_alloc_tfm(const char *alg_name, u32 tfm_flags); -struct crypto_tfm *crypto_alloc_tfm2(const char *alg_name, u32 tfm_flags, - int nomodload); void crypto_free_tfm(struct crypto_tfm *tfm); /* @@ -309,13 +301,7 @@ static inline unsigned int crypto_tfm_alg_alignmask(struct crypto_tfm *tfm) static inline void *crypto_tfm_ctx(struct crypto_tfm *tfm) { - return tfm->__crt_ctx; -} - -static inline unsigned int crypto_tfm_ctx_alignment(void) -{ - struct crypto_tfm *tfm; - return __alignof__(tfm->__crt_ctx); + return (void *)&tfm[1]; } /* @@ -335,14 +321,6 @@ static inline void crypto_digest_update(struct crypto_tfm *tfm, tfm->crt_digest.dit_update(tfm, sg, nsg); } -static inline void crypto_digest_update_kernel(struct crypto_tfm *tfm, - const void *data, - size_t count) -{ - BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_DIGEST); - tfm->crt_digest.dit_update_kernel(tfm, data, count); -} - static inline void crypto_digest_final(struct crypto_tfm *tfm, u8 *out) { BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_DIGEST);