Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
[pandora-kernel.git] / include / linux / crypto.h
index d88bf8a..5a0470e 100644 (file)
@@ -17,7 +17,6 @@
 #ifndef _LINUX_CRYPTO_H
 #define _LINUX_CRYPTO_H
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/types.h>
@@ -229,6 +228,8 @@ struct crypto_tfm {
        } crt_u;
        
        struct crypto_alg *__crt_alg;
+
+       char __crt_ctx[] __attribute__ ((__aligned__));
 };
 
 /* 
@@ -301,7 +302,13 @@ static inline unsigned int crypto_tfm_alg_alignmask(struct crypto_tfm *tfm)
 
 static inline void *crypto_tfm_ctx(struct crypto_tfm *tfm)
 {
-       return (void *)&tfm[1];
+       return tfm->__crt_ctx;
+}
+
+static inline unsigned int crypto_tfm_ctx_alignment(void)
+{
+       struct crypto_tfm *tfm;
+       return __alignof__(tfm->__crt_ctx);
 }
 
 /*