diff mbox series

[cryptodev,buildfix] crypto: n2/des - fix build breakage after DES updates

Message ID 20190822114915.5363-1-ard.biesheuvel@linaro.org (mailing list archive)
State Accepted
Delegated to: Herbert Xu
Headers show
Series [cryptodev,buildfix] crypto: n2/des - fix build breakage after DES updates | expand

Commit Message

Ard Biesheuvel Aug. 22, 2019, 11:49 a.m. UTC
Fix build breakage caused by the DES library refactor.

Fixes: d4b90dbc8578 ("crypto: n2/des - switch to new verification routines")
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
 drivers/crypto/n2_core.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Herbert Xu Aug. 22, 2019, 12:15 p.m. UTC | #1
On Thu, Aug 22, 2019 at 02:49:15PM +0300, Ard Biesheuvel wrote:
> Fix build breakage caused by the DES library refactor.
> 
> Fixes: d4b90dbc8578 ("crypto: n2/des - switch to new verification routines")
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> ---
>  drivers/crypto/n2_core.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)

Patch applied.  Thanks.
diff mbox series

Patch

diff --git a/drivers/crypto/n2_core.c b/drivers/crypto/n2_core.c
index 4765163df6be..63923cc33727 100644
--- a/drivers/crypto/n2_core.c
+++ b/drivers/crypto/n2_core.c
@@ -757,7 +757,8 @@  static int n2_aes_setkey(struct crypto_ablkcipher *cipher, const u8 *key,
 static int n2_des_setkey(struct crypto_ablkcipher *cipher, const u8 *key,
 			 unsigned int keylen)
 {
-	struct n2_cipher_context *ctx = crypto_ablkcipher_ctx(cipher);
+	struct crypto_tfm *tfm = crypto_ablkcipher_tfm(cipher);
+	struct n2_cipher_context *ctx = crypto_tfm_ctx(tfm);
 	struct n2_cipher_alg *n2alg = n2_cipher_alg(tfm);
 	int err;
 
@@ -775,7 +776,8 @@  static int n2_des_setkey(struct crypto_ablkcipher *cipher, const u8 *key,
 static int n2_3des_setkey(struct crypto_ablkcipher *cipher, const u8 *key,
 			  unsigned int keylen)
 {
-	struct n2_cipher_context *ctx = crypto_ablkcipher_ctx(cipher);
+	struct crypto_tfm *tfm = crypto_ablkcipher_tfm(cipher);
+	struct n2_cipher_context *ctx = crypto_tfm_ctx(tfm);
 	struct n2_cipher_alg *n2alg = n2_cipher_alg(tfm);
 	int err;