Apply Crypto API wrappers to the exported crypto symbol in
CONFIG_CRYPTO_SM3_GENERIC-related crypto to convert them into pluggable
interface.

Signed-off-by: Jay Wang <[email protected]>
---
 crypto/Makefile      | 2 +-
 crypto/sm3_generic.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/crypto/Makefile b/crypto/Makefile
index ba7bc1e3a65a..64df3408cca0 100644
--- a/crypto/Makefile
+++ b/crypto/Makefile
@@ -83,7 +83,7 @@ crypto-objs-$(CONFIG_CRYPTO_SHA1) += sha1.o
 crypto-objs-$(CONFIG_CRYPTO_SHA256) += sha256.o
 crypto-objs-$(CONFIG_CRYPTO_SHA512) += sha512.o
 crypto-objs-$(CONFIG_CRYPTO_SHA3) += sha3.o
-obj-$(CONFIG_CRYPTO_SM3_GENERIC) += sm3_generic.o
+crypto-objs-$(CONFIG_CRYPTO_SM3_GENERIC) += sm3_generic.o
 obj-$(CONFIG_CRYPTO_STREEBOG) += streebog_generic.o
 obj-$(CONFIG_CRYPTO_WP512) += wp512.o
 CFLAGS_wp512.o := $(call cc-option,-fno-schedule-insns)  # 
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79149
diff --git a/crypto/sm3_generic.c b/crypto/sm3_generic.c
index 7529139fcc96..90e75d3576d2 100644
--- a/crypto/sm3_generic.c
+++ b/crypto/sm3_generic.c
@@ -62,8 +62,8 @@ static void __exit sm3_generic_mod_fini(void)
        crypto_unregister_shash(&sm3_alg);
 }
 
-module_init(sm3_generic_mod_init);
-module_exit(sm3_generic_mod_fini);
+crypto_module_init(sm3_generic_mod_init);
+crypto_module_exit(sm3_generic_mod_fini);
 
 MODULE_LICENSE("GPL v2");
 MODULE_DESCRIPTION("SM3 Secure Hash Algorithm");
-- 
2.47.3


Reply via email to