X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=crypto%2Finternal.h;h=37aa652ce5ce6f89e4738ac07dd770b8df4a6ac9;hb=183dee0f02d878def016476afd7995bec8d5f3a6;hp=68612874b5fde627e571b67ce1533084055e6104;hpb=c27510c031cae15f84b90f28d6dc02c314d84cf8;p=linux-2.6-omap-h63xx.git diff --git a/crypto/internal.h b/crypto/internal.h index 68612874b5f..37aa652ce5c 100644 --- a/crypto/internal.h +++ b/crypto/internal.h @@ -17,6 +17,7 @@ #include #include #include +#include #include extern enum km_type crypto_km_types[]; @@ -38,7 +39,7 @@ static inline void crypto_kunmap(void *vaddr, int out) static inline void crypto_yield(struct crypto_tfm *tfm) { - if (!in_atomic()) + if (tfm->crt_flags & CRYPTO_TFM_REQ_MAY_SLEEP) cond_resched(); } @@ -75,7 +76,7 @@ static inline unsigned int crypto_cipher_ctxsize(struct crypto_alg *alg, switch (flags & CRYPTO_TFM_MODE_MASK) { case CRYPTO_TFM_MODE_CBC: - len = ALIGN(len, alg->cra_alignmask + 1); + len = ALIGN(len, (unsigned long)alg->cra_alignmask + 1); len += alg->cra_blocksize; break; }