mirror of
https://github.com/gatieme/LDD-LinuxDeviceDrivers.git
synced 2026-08-20 03:33:20 +08:00
26 lines
411 B
C
26 lines
411 B
C
// http://blog.csdn.net/tommy_wxie/article/details/12521535
|
|
// http://blog.chinaunix.net/uid-20651662-id-1906954.html
|
|
//
|
|
#include <linux/kernel.h>
|
|
#include <linux/init.h>
|
|
#include <linux/module.h>
|
|
|
|
static int __init hello_init(void)
|
|
{
|
|
int *p = 0;
|
|
|
|
*p = 1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
static void __exit hello_exit(void)
|
|
{
|
|
return;
|
|
}
|
|
|
|
module_init(hello_init);
|
|
module_exit(hello_exit);
|
|
|
|
MODULE_LICENSE("GPL");
|