diff options
-rw-r--r-- | drivers/crypto/omap-aes.c | 17 | ||||
-rw-r--r-- | drivers/crypto/omap-aes.h | 2 |
2 files changed, 9 insertions, 10 deletions
diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c index 9019f6b67986..a553ffddb11b 100644 --- a/drivers/crypto/omap-aes.c +++ b/drivers/crypto/omap-aes.c | |||
@@ -522,9 +522,9 @@ static int omap_aes_crypt(struct ablkcipher_request *req, unsigned long mode) | |||
522 | !!(mode & FLAGS_CBC)); | 522 | !!(mode & FLAGS_CBC)); |
523 | 523 | ||
524 | if (req->nbytes < aes_fallback_sz) { | 524 | if (req->nbytes < aes_fallback_sz) { |
525 | SKCIPHER_REQUEST_ON_STACK(subreq, ctx->fallback); | 525 | SYNC_SKCIPHER_REQUEST_ON_STACK(subreq, ctx->fallback); |
526 | 526 | ||
527 | skcipher_request_set_tfm(subreq, ctx->fallback); | 527 | skcipher_request_set_sync_tfm(subreq, ctx->fallback); |
528 | skcipher_request_set_callback(subreq, req->base.flags, NULL, | 528 | skcipher_request_set_callback(subreq, req->base.flags, NULL, |
529 | NULL); | 529 | NULL); |
530 | skcipher_request_set_crypt(subreq, req->src, req->dst, | 530 | skcipher_request_set_crypt(subreq, req->src, req->dst, |
@@ -564,11 +564,11 @@ static int omap_aes_setkey(struct crypto_ablkcipher *tfm, const u8 *key, | |||
564 | memcpy(ctx->key, key, keylen); | 564 | memcpy(ctx->key, key, keylen); |
565 | ctx->keylen = keylen; | 565 | ctx->keylen = keylen; |
566 | 566 | ||
567 | crypto_skcipher_clear_flags(ctx->fallback, CRYPTO_TFM_REQ_MASK); | 567 | crypto_sync_skcipher_clear_flags(ctx->fallback, CRYPTO_TFM_REQ_MASK); |
568 | crypto_skcipher_set_flags(ctx->fallback, tfm->base.crt_flags & | 568 | crypto_sync_skcipher_set_flags(ctx->fallback, tfm->base.crt_flags & |
569 | CRYPTO_TFM_REQ_MASK); | 569 | CRYPTO_TFM_REQ_MASK); |
570 | 570 | ||
571 | ret = crypto_skcipher_setkey(ctx->fallback, key, keylen); | 571 | ret = crypto_sync_skcipher_setkey(ctx->fallback, key, keylen); |
572 | if (!ret) | 572 | if (!ret) |
573 | return 0; | 573 | return 0; |
574 | 574 | ||
@@ -613,11 +613,10 @@ static int omap_aes_crypt_req(struct crypto_engine *engine, | |||
613 | static int omap_aes_cra_init(struct crypto_tfm *tfm) | 613 | static int omap_aes_cra_init(struct crypto_tfm *tfm) |
614 | { | 614 | { |
615 | const char *name = crypto_tfm_alg_name(tfm); | 615 | const char *name = crypto_tfm_alg_name(tfm); |
616 | const u32 flags = CRYPTO_ALG_ASYNC | CRYPTO_ALG_NEED_FALLBACK; | ||
617 | struct omap_aes_ctx *ctx = crypto_tfm_ctx(tfm); | 616 | struct omap_aes_ctx *ctx = crypto_tfm_ctx(tfm); |
618 | struct crypto_skcipher *blk; | 617 | struct crypto_sync_skcipher *blk; |
619 | 618 | ||
620 | blk = crypto_alloc_skcipher(name, 0, flags); | 619 | blk = crypto_alloc_sync_skcipher(name, 0, CRYPTO_ALG_NEED_FALLBACK); |
621 | if (IS_ERR(blk)) | 620 | if (IS_ERR(blk)) |
622 | return PTR_ERR(blk); | 621 | return PTR_ERR(blk); |
623 | 622 | ||
@@ -667,7 +666,7 @@ static void omap_aes_cra_exit(struct crypto_tfm *tfm) | |||
667 | struct omap_aes_ctx *ctx = crypto_tfm_ctx(tfm); | 666 | struct omap_aes_ctx *ctx = crypto_tfm_ctx(tfm); |
668 | 667 | ||
669 | if (ctx->fallback) | 668 | if (ctx->fallback) |
670 | crypto_free_skcipher(ctx->fallback); | 669 | crypto_free_sync_skcipher(ctx->fallback); |
671 | 670 | ||
672 | ctx->fallback = NULL; | 671 | ctx->fallback = NULL; |
673 | } | 672 | } |
diff --git a/drivers/crypto/omap-aes.h b/drivers/crypto/omap-aes.h index fc3b46a85809..7e02920ef6f8 100644 --- a/drivers/crypto/omap-aes.h +++ b/drivers/crypto/omap-aes.h | |||
@@ -101,7 +101,7 @@ struct omap_aes_ctx { | |||
101 | int keylen; | 101 | int keylen; |
102 | u32 key[AES_KEYSIZE_256 / sizeof(u32)]; | 102 | u32 key[AES_KEYSIZE_256 / sizeof(u32)]; |
103 | u8 nonce[4]; | 103 | u8 nonce[4]; |
104 | struct crypto_skcipher *fallback; | 104 | struct crypto_sync_skcipher *fallback; |
105 | struct crypto_skcipher *ctr; | 105 | struct crypto_skcipher *ctr; |
106 | }; | 106 | }; |
107 | 107 | ||