]> git.baikalelectronics.ru Git - kernel.git/commitdiff
crypto: api - Move crypto_yield() to algapi.h
authorMarek Vasut <marex@denx.de>
Mon, 26 May 2014 13:32:05 +0000 (15:32 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 20 Jun 2014 13:26:04 +0000 (21:26 +0800)
It makes no sense for crypto_yield() to be defined in scatterwalk.h ,
move it into algapi.h as it's an internal function to crypto API.

Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
include/crypto/algapi.h
include/crypto/scatterwalk.h

index 016c2f110f63e5017d183bb7621c1c15ac9587ee..623a59c1ff5a6ef45d4cebe4ae8c0b7462aaff76 100644 (file)
@@ -410,4 +410,10 @@ static inline int crypto_memneq(const void *a, const void *b, size_t size)
        return __crypto_memneq(a, b, size) != 0UL ? 1 : 0;
 }
 
+static inline void crypto_yield(u32 flags)
+{
+       if (flags & CRYPTO_TFM_REQ_MAY_SLEEP)
+               cond_resched();
+}
+
 #endif /* _CRYPTO_ALGAPI_H */
index 6a626a507b8ca2d9c1a167b0758c7d7d3604013e..7ef512f8631c134be5f37589a57f1824bc42742b 100644 (file)
 #include <linux/scatterlist.h>
 #include <linux/sched.h>
 
-static inline void crypto_yield(u32 flags)
-{
-       if (flags & CRYPTO_TFM_REQ_MAY_SLEEP)
-               cond_resched();
-}
-
 static inline void scatterwalk_sg_chain(struct scatterlist *sg1, int num,
                                        struct scatterlist *sg2)
 {