mirror of
https://git.yoctoproject.org/poky-contrib
synced 2025-05-08 23:52:25 +08:00
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. (From OE-Core rev: dd0cf45cdde7a197293322436957566e9a11a506) Signed-off-by: Trevor Woerner <twoerner@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
ba7f322a3e
commit
6b86c70081
@ -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");
|
||||
|
Loading…
x
Reference in New Issue
Block a user