17 lines
484 B
C
17 lines
484 B
C
#include <linux/init.h> /* Needed for the __init, __initdata and __exit macros. */
|
|
#include <linux/module.h> /* for all kernel modules */
|
|
#include <linux/printk.h> /* Needed for pr_info() */
|
|
|
|
static int intInitData __initdata = 3;
|
|
|
|
static int __init start_module(void) /* module entry point */
|
|
{
|
|
pr_info("Hello , user %d !\n", intInitData);
|
|
return 0;
|
|
}
|
|
|
|
module_init(start_module);
|
|
|
|
MODULE_LICENSE("GPL");
|
|
MODULE_DESCRIPTION("My first cool kernel module");
|
|
MODULE_AUTHOR("user"); |