一、程序
#include <linux/init.h>
#include <linux/module.h>
static int __init hello_init(void)
{
printk("Hello World! \n");
return 0;
}
static void __exit hello_exit(void)
{
printk("Module exit! \n");
}
module_init(hello_init);
module_exit(hello_exit);
MODULE_AUTHOR("chi_hong");
MODULE_DESCRIPTION("Hello Linux Driver");
MODULE_ALIAS("It's only for fun");
MODULE_VERSION("v1.0");
MODULE_LICENSE("GPL");