mirror of
https://github.com/gatieme/LDD-LinuxDeviceDrivers.git
synced 2026-08-19 01:22:36 +08:00
hello world中添加了作者信息, makefile中添加编译参数...
This commit is contained in:
@@ -25,6 +25,9 @@ DRIVER_LICENSE := "Dual BSD/GPL"
|
||||
|
||||
|
||||
MODULE_NAME := hello
|
||||
MODCFLAGS:=-O6 -Wall -DMODULE -D__KERNEL__ -DLINUX -std=c99
|
||||
|
||||
|
||||
|
||||
ifneq ($(KERNELRELEASE),)
|
||||
|
||||
|
||||
@@ -1,7 +1,15 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/sched.h>
|
||||
//#include <linux/list.h>
|
||||
//#include <linux/mm.h>
|
||||
//#include <linux/mm_types.h>
|
||||
|
||||
|
||||
MODULE_LICENSE("Dual BSD/GPL");
|
||||
MODULE_AUTHOR("Gatieme");
|
||||
MODULE_DESCRIPTION("hello world");
|
||||
|
||||
/*
|
||||
* print the module information
|
||||
@@ -36,6 +44,7 @@ static int hello_init(void)
|
||||
|
||||
static void hello_exit(void)
|
||||
{
|
||||
printk(KERN_ERR"exit");
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user