#include #include /* Give the kernel some info about this module */ MODULE_LICENSE("GPL"); /* A very good license to use :-) */ MODULE_AUTHOR("Insert Witty Name Here"); MODULE_DESCRIPTION("This is a basic module example"); static void greet(void) { printk(KERN_DEBUG "LUV: Greetz!"); } /* Called when the module first loads. Think of this as main() */ static int __init luv_init(void) { greet(); return 0; } /* Called when the module unloads */ static void __exit luv_exit(void) { printk(KERN_INFO "LUV: Cheers!"); } /* Hook our initilization and cleanup routines to the kernel */ module_init(luv_init); module_exit(luv_exit); /* Only necessary if we want this to be unloadable */