summaryrefslogtreecommitdiffstats
path: root/meta-skeleton
diff options
context:
space:
mode:
authorTrevor Woerner <twoerner@gmail.com>2021-09-14 20:38:03 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-09-16 09:48:38 +0100
commitdd0cf45cdde7a197293322436957566e9a11a506 (patch)
tree30e7d6d91b9f1e757ed7a99027d67434af15f393 /meta-skeleton
parentf58d54b31a1ddb4e60eb07365bfb7dfe78ed56af (diff)
downloadopenembedded-core-dd0cf45cdde7a197293322436957566e9a11a506.tar.gz
hello-mod/hello.c: convert to module_init/module_exit
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 <twoerner@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta-skeleton')
-rw-r--r--meta-skeleton/recipes-kernel/hello-mod/files/hello.c6
1 files 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");