mirror of
https://github.com/gatieme/LDD-LinuxDeviceDrivers.git
synced 2026-08-19 19:14:17 +08:00
25 lines
386 B
C
25 lines
386 B
C
// http://blog.csdn.net/tommy_wxie/article/details/12521535
|
|
// http://blog.chinaunix.net/uid-20651662-id-1906954.html
|
|
//
|
|
#include <linux/kerel.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");
|