From: Vegard Nossum <[email protected]>

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

Signed-off-by: Vegard Nossum <[email protected]>
[add jitterentropy_rng.o into crypto-objs-y; revise commit message]
Signed-off-by: Jay Wang <[email protected]>
---
 crypto/Makefile              | 2 +-
 crypto/jitterentropy-kcapi.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/crypto/Makefile b/crypto/Makefile
index 25f0d9d56469..1d5ee8dc24d9 100644
--- a/crypto/Makefile
+++ b/crypto/Makefile
@@ -164,7 +164,7 @@ obj-$(CONFIG_CRYPTO_XXHASH) += xxhash_generic.o
 obj-$(CONFIG_CRYPTO_842) += 842.o
 crypto-objs-$(CONFIG_CRYPTO_RNG2) += rng.o
 crypto-objs-$(CONFIG_CRYPTO_DRBG) += drbg.o
-obj-$(CONFIG_CRYPTO_JITTERENTROPY) += jitterentropy_rng.o
+crypto-objs-$(CONFIG_CRYPTO_JITTERENTROPY) += jitterentropy_rng.o
 CFLAGS_jitterentropy.o = -O0
 KASAN_SANITIZE_jitterentropy.o = n
 UBSAN_SANITIZE_jitterentropy.o = n
diff --git a/crypto/jitterentropy-kcapi.c b/crypto/jitterentropy-kcapi.c
index 7c880cf34c52..11115b8df694 100644
--- a/crypto/jitterentropy-kcapi.c
+++ b/crypto/jitterentropy-kcapi.c
@@ -361,8 +361,8 @@ static void __exit jent_mod_exit(void)
        crypto_unregister_rng(&jent_alg);
 }
 
-module_init(jent_mod_init);
-module_exit(jent_mod_exit);
+crypto_module_init(jent_mod_init);
+crypto_module_exit(jent_mod_exit);
 
 MODULE_LICENSE("Dual BSD/GPL");
 MODULE_AUTHOR("Stephan Mueller <[email protected]>");
-- 
2.47.3


Reply via email to