diff options
| -rw-r--r-- | include/linux/crypto.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/linux/crypto.h b/include/linux/crypto.h index 0ec2467891db..0de7e2ace822 100644 --- a/include/linux/crypto.h +++ b/include/linux/crypto.h | |||
| @@ -588,6 +588,12 @@ static inline int crypto_ablkcipher_reqsize(struct crypto_ablkcipher *tfm) | |||
| 588 | return crypto_ablkcipher_crt(tfm)->reqsize; | 588 | return crypto_ablkcipher_crt(tfm)->reqsize; |
| 589 | } | 589 | } |
| 590 | 590 | ||
| 591 | static inline void ablkcipher_request_set_tfm( | ||
| 592 | struct ablkcipher_request *req, struct crypto_ablkcipher *tfm) | ||
| 593 | { | ||
| 594 | req->base.tfm = crypto_ablkcipher_tfm(tfm); | ||
| 595 | } | ||
| 596 | |||
| 591 | static inline struct ablkcipher_request *ablkcipher_request_cast( | 597 | static inline struct ablkcipher_request *ablkcipher_request_cast( |
| 592 | struct crypto_async_request *req) | 598 | struct crypto_async_request *req) |
| 593 | { | 599 | { |
| @@ -603,7 +609,7 @@ static inline struct ablkcipher_request *ablkcipher_request_alloc( | |||
| 603 | crypto_ablkcipher_reqsize(tfm), gfp); | 609 | crypto_ablkcipher_reqsize(tfm), gfp); |
| 604 | 610 | ||
| 605 | if (likely(req)) | 611 | if (likely(req)) |
| 606 | req->base.tfm = crypto_ablkcipher_tfm(tfm); | 612 | ablkcipher_request_set_tfm(req, tfm); |
| 607 | 613 | ||
| 608 | return req; | 614 | return req; |
| 609 | } | 615 | } |
