diff options
author | Baolin Wang <baolin.wang@linaro.org> | 2016-01-26 07:25:38 -0500 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2016-02-01 09:26:59 -0500 |
commit | 9f93a8a0ba91fa3babe76a428e6c24f4c39f125e (patch) | |
tree | 5a13aef7bfe3f7f7076dce321ca5e684268e1842 /include/crypto/algapi.h | |
parent | cc831d32d7b1bd45c5d74c44d8e39d354049c369 (diff) |
crypto: api - Introduce crypto_queue_len() helper function
This patch introduces crypto_queue_len() helper function to help to get the
queue length in the crypto queue list now.
Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/crypto/algapi.h')
-rw-r--r-- | include/crypto/algapi.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/crypto/algapi.h b/include/crypto/algapi.h index c9fe145f7dd3..4f861c44d066 100644 --- a/include/crypto/algapi.h +++ b/include/crypto/algapi.h | |||
@@ -184,6 +184,10 @@ int crypto_enqueue_request(struct crypto_queue *queue, | |||
184 | struct crypto_async_request *request); | 184 | struct crypto_async_request *request); |
185 | struct crypto_async_request *crypto_dequeue_request(struct crypto_queue *queue); | 185 | struct crypto_async_request *crypto_dequeue_request(struct crypto_queue *queue); |
186 | int crypto_tfm_in_queue(struct crypto_queue *queue, struct crypto_tfm *tfm); | 186 | int crypto_tfm_in_queue(struct crypto_queue *queue, struct crypto_tfm *tfm); |
187 | static inline unsigned int crypto_queue_len(struct crypto_queue *queue) | ||
188 | { | ||
189 | return queue->qlen; | ||
190 | } | ||
187 | 191 | ||
188 | /* These functions require the input/output to be aligned as u32. */ | 192 | /* These functions require the input/output to be aligned as u32. */ |
189 | void crypto_inc(u8 *a, unsigned int size); | 193 | void crypto_inc(u8 *a, unsigned int size); |