From: Marek Vasut Date: Wed, 14 May 2014 09:42:52 +0000 (+0200) Subject: crypto: cesa - tfm->__crt_alg->cra_type directly X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=51a716349946362dee27aa48b1987870cb69636b;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git crypto: cesa - tfm->__crt_alg->cra_type directly The checking for the type of algorithm implementation is pretty strange here. Use regular flags to check for the type instead. Signed-off-by: Marek Vasut Cc: Bill Pemberton Cc: Herbert Xu Cc: Kent Yoder Cc: Jamie Iles Cc: Phil Sutter Signed-off-by: Herbert Xu --- diff --git a/drivers/crypto/mv_cesa.c b/drivers/crypto/mv_cesa.c index 1549db76982e..29d0ee504907 100644 --- a/drivers/crypto/mv_cesa.c +++ b/drivers/crypto/mv_cesa.c @@ -622,8 +622,8 @@ static int queue_manag(void *data) } if (async_req) { - if (async_req->tfm->__crt_alg->cra_type != - &crypto_ahash_type) { + if (crypto_tfm_alg_type(async_req->tfm) != + CRYPTO_ALG_TYPE_AHASH) { struct ablkcipher_request *req = ablkcipher_request_cast(async_req); mv_start_new_crypt_req(req);