Switch away from the old init_module/cleanup_module function names for the
main entry points. Change them to the documented method with module_init()
and module_exit() markers next to static functions.

Signed-off-by: Trevor Woerner <twoer...@gmail.com>
---
 meta-skeleton/recipes-kernel/hello-mod/files/hello.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/meta-skeleton/recipes-kernel/hello-mod/files/hello.c 
b/meta-skeleton/recipes-kernel/hello-mod/files/hello.c
index f3c0d372eb..b68b0c348e 100644
--- a/meta-skeleton/recipes-kernel/hello-mod/files/hello.c
+++ b/meta-skeleton/recipes-kernel/hello-mod/files/hello.c
@@ -19,15 +19,17 @@
 
 #include <linux/module.h>
 
-int init_module(void)
+static int __init hello_init(void)
 {
        printk("Hello World!\n");
        return 0;
 }
 
-void cleanup_module(void)
+static void __exit hello_exit(void)
 {
        printk("Goodbye Cruel World!\n");
 }
 
+module_init(hello_init);
+module_exit(hello_exit);
 MODULE_LICENSE("GPL");
-- 
2.30.0.rc0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#156031): 
https://lists.openembedded.org/g/openembedded-core/message/156031
Mute This Topic: https://lists.openembedded.org/mt/85617013/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to