summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/crypto.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/crypto.h b/include/linux/crypto.h
index fe75320ff9a3..b8d875b11193 100644
--- a/include/linux/crypto.h
+++ b/include/linux/crypto.h
@@ -514,5 +514,13 @@ static inline void crypto_request_set_tfm(struct crypto_async_request *req,
struct crypto_async_request *crypto_request_clone(
struct crypto_async_request *req, size_t total, gfp_t gfp);
+static inline void crypto_stack_request_init(struct crypto_async_request *req,
+ struct crypto_tfm *tfm)
+{
+ req->flags = 0;
+ crypto_request_set_tfm(req, tfm);
+ req->flags |= CRYPTO_TFM_REQ_ON_STACK;
+}
+
#endif /* _LINUX_CRYPTO_H */