hello-4.c
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
 
#define DRIVER_AUTHOR "Peter Jay Salzman <p@dirac.org>"
#define DRIVER_DESC "A sample driver"
 
static int hello_4_data __initdata = 4;
 
static int __init hello_4_init(void)
{
  printk(KERN_INFO "Hello, world %d\n", hello_4_data);
  return 0;
}
 
static void __exit hello_4_exit(void)
{
  printk(KERN_INFO "Goodbye, world 4\n");
}
 
module_init(hello_4_init);
module_exit(hello_4_exit);
 
MODULE_LICENSE("GPL");
MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC);
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License