21 lines
359 B
C
21 lines
359 B
C
#include <linux/init.h>
|
|
#include <linux/module.h>
|
|
#include <linux/printk.h>
|
|
|
|
MODULE_LICENSE("GPL");
|
|
MODULE_DESCRIPTION("hello world module");
|
|
|
|
static int __init hello_init(void)
|
|
{
|
|
pr_info("Hello world!\n");
|
|
return 0;
|
|
}
|
|
|
|
static void __exit hello_exit(void)
|
|
{
|
|
pr_info("Cleaning up module.\n");
|
|
}
|
|
|
|
module_init(hello_init);
|
|
module_exit(hello_exit);
|