diff --git a/study/driver/hello/Makefile b/study/driver/hello/Makefile index 807729b..3b708b4 100644 --- a/study/driver/hello/Makefile +++ b/study/driver/hello/Makefile @@ -25,6 +25,9 @@ DRIVER_LICENSE := "Dual BSD/GPL" MODULE_NAME := hello +MODCFLAGS:=-O6 -Wall -DMODULE -D__KERNEL__ -DLINUX -std=c99 + + ifneq ($(KERNELRELEASE),) diff --git a/study/driver/hello/hello.c b/study/driver/hello/hello.c index 2dcb60c..c456dfb 100644 --- a/study/driver/hello/hello.c +++ b/study/driver/hello/hello.c @@ -1,7 +1,15 @@ #include +#include #include +#include +//#include +//#include +//#include + 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"); }