From: Christophe Leroy Date: Tue, 21 May 2019 13:34:21 +0000 (+0000) Subject: crypto: talitos - use IS_ENABLED() in has_ftr_sec1() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=89b32dfe008caa9c14ed42cdba656b6d1b753550;p=openwrt%2Fstaging%2Fblogic.git crypto: talitos - use IS_ENABLED() in has_ftr_sec1() This patch rewrites has_ftr_sec1() using IS_ENABLED() instead of #ifdefs Signed-off-by: Christophe Leroy Signed-off-by: Herbert Xu --- diff --git a/drivers/crypto/talitos.h b/drivers/crypto/talitos.h index 95e97951b924..5699d46401e6 100644 --- a/drivers/crypto/talitos.h +++ b/drivers/crypto/talitos.h @@ -164,13 +164,11 @@ struct talitos_private { */ static inline bool has_ftr_sec1(struct talitos_private *priv) { -#if defined(CONFIG_CRYPTO_DEV_TALITOS1) && defined(CONFIG_CRYPTO_DEV_TALITOS2) - return priv->features & TALITOS_FTR_SEC1 ? true : false; -#elif defined(CONFIG_CRYPTO_DEV_TALITOS1) - return true; -#else - return false; -#endif + if (IS_ENABLED(CONFIG_CRYPTO_DEV_TALITOS1) && + IS_ENABLED(CONFIG_CRYPTO_DEV_TALITOS2)) + return priv->features & TALITOS_FTR_SEC1; + + return IS_ENABLED(CONFIG_CRYPTO_DEV_TALITOS1); } /*