some bug fixed in the kernel module templates

This commit is contained in:
lxsameer 2011-02-23 11:41:12 +03:30
parent 298d43a1b1
commit b921866a97
2 changed files with 6 additions and 6 deletions

View File

@ -8,7 +8,7 @@ else
DEBFLAGS = -O2 DEBFLAGS = -O2
endif endif
CFLAGS += $(DEBFLAGS) -I$(LDDINCDIR) EXTRA_CFLAGS += $(DEBFLAGS) -I$(LDDINCDIR)
ifneq ($(KERNELRELEASE),) ifneq ($(KERNELRELEASE),)
# call from kernel build system # call from kernel build system
@ -31,7 +31,7 @@ clean:
rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions
depend .depend dep: depend .depend dep:
$(CC) $(CFLAGS) -M *.c > .depend $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -M *.c > .depend
ifeq (.depend,$(wildcard .depend)) ifeq (.depend,$(wildcard .depend))

View File

@ -10,17 +10,17 @@ MODULE_AUTHOR("::author:: <::email::>");
MODULE_DESCRIPTION("::desc::"); MODULE_DESCRIPTION("::desc::");
static int __init module_init(void) static int __init module_initial(void)
{ {
printk(KERN_ALERT "Hello, world\n"); printk(KERN_ALERT "Hello, world\n");
return 0; return 0;
} }
static void module_exit(void) static void module_cleanup(void)
{ {
printk(KERN_ALERT "Goodbye, cruel world\n"); printk(KERN_ALERT "Goodbye, cruel world\n");
} }
module_init(module_init); module_init(module_initial);
module_exit(module_exit); module_exit(module_cleanup);