diff options
author | Gilad Ben-Yossef <gilad@benyossef.com> | 2017-10-18 08:00:39 +0100 |
---|---|---|
committer | Mircea Pop <mircea.pop@nxp.com> | 2019-05-14 09:54:34 +0200 |
commit | e9a23adaf413756c4c38bceeaeb5d5a5a4329ca1 (patch) | |
tree | 8f497aece4bf12f0c678e09eebf8045bfc6fc57b /crypto/af_alg.c | |
parent | 73d2e52ac3cc69063fc3ee5660f858ffbf3a6e05 (diff) |
crypto: algif - move to generic async completion
algif starts several async crypto ops and waits for their completion.
Move it over to generic code doing the same.
Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 2c3f8b162106a7d12097d02eb22459f57fab8247)
Diffstat (limited to 'crypto/af_alg.c')
-rw-r--r-- | crypto/af_alg.c | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/crypto/af_alg.c b/crypto/af_alg.c index 42dfdd1fd6d8..671e42ff21d4 100644 --- a/crypto/af_alg.c +++ b/crypto/af_alg.c @@ -483,33 +483,6 @@ int af_alg_cmsg_send(struct msghdr *msg, struct af_alg_control *con) } EXPORT_SYMBOL_GPL(af_alg_cmsg_send); -int af_alg_wait_for_completion(int err, struct af_alg_completion *completion) -{ - switch (err) { - case -EINPROGRESS: - case -EBUSY: - wait_for_completion(&completion->completion); - reinit_completion(&completion->completion); - err = completion->err; - break; - }; - - return err; -} -EXPORT_SYMBOL_GPL(af_alg_wait_for_completion); - -void af_alg_complete(struct crypto_async_request *req, int err) -{ - struct af_alg_completion *completion = req->data; - - if (err == -EINPROGRESS) - return; - - completion->err = err; - complete(&completion->completion); -} -EXPORT_SYMBOL_GPL(af_alg_complete); - /** * af_alg_alloc_tsgl - allocate the TX SGL * |