hello-5.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"
 
int myint = 1022;
module_param(myint, int, 0);
 
static int __init hello_5_init(void)
{
  printk(KERN_INFO "Hello, world %d\n", myint);
  return 0;
}
 
static void __exit hello_5_exit(void)
{
  printk(KERN_INFO "Goodbye, world 5\n");
}
 
module_init(hello_5_init);
module_exit(hello_5_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