aboutsummaryrefslogtreecommitdiff
path: root/include/crypto/internal
diff options
context:
space:
mode:
authorTadeusz Struk <tadeusz.struk@intel.com>2016-02-01 11:17:30 -0800
committerHerbert Xu <herbert@gondor.apana.org.au>2016-02-06 15:33:22 +0800
commit53a0bd7144224ba26b326a16e9eaf8bd7f433220 (patch)
tree68a84943ef791083bb14c4cccbb9422281a346fa /include/crypto/internal
parentf823ab93c518f49c94453bfa9f5c2de6129c9fc6 (diff)
downloadlinux-stericsson-53a0bd7144224ba26b326a16e9eaf8bd7f433220.tar.gz
crypto: aead - move aead_request_cast helper to aead.h
Move the helper function to common header for everybody to use. changes in v2: - move the helper to crypto/internal/aead.h instead of crypto/aead.h Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/crypto/internal')
-rw-r--r--include/crypto/internal/aead.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/crypto/internal/aead.h b/include/crypto/internal/aead.h
index 5554cdd8d6c1..da3864991d4c 100644
--- a/include/crypto/internal/aead.h
+++ b/include/crypto/internal/aead.h
@@ -80,6 +80,12 @@ static inline u32 aead_request_flags(struct aead_request *req)
return req->base.flags;
}
+static inline struct aead_request *aead_request_cast(
+ struct crypto_async_request *req)
+{
+ return container_of(req, struct aead_request, base);
+}
+
static inline void crypto_set_aead_spawn(
struct crypto_aead_spawn *spawn, struct crypto_instance *inst)
{