some bug fixed in the kernel module templates
This commit is contained in:
parent
298d43a1b1
commit
b921866a97
|
@ -8,7 +8,7 @@ else
|
|||
DEBFLAGS = -O2
|
||||
endif
|
||||
|
||||
CFLAGS += $(DEBFLAGS) -I$(LDDINCDIR)
|
||||
EXTRA_CFLAGS += $(DEBFLAGS) -I$(LDDINCDIR)
|
||||
|
||||
ifneq ($(KERNELRELEASE),)
|
||||
# call from kernel build system
|
||||
|
@ -31,7 +31,7 @@ clean:
|
|||
rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions
|
||||
|
||||
depend .depend dep:
|
||||
$(CC) $(CFLAGS) -M *.c > .depend
|
||||
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -M *.c > .depend
|
||||
|
||||
|
||||
ifeq (.depend,$(wildcard .depend))
|
||||
|
|
|
@ -10,17 +10,17 @@ MODULE_AUTHOR("::author:: <::email::>");
|
|||
MODULE_DESCRIPTION("::desc::");
|
||||
|
||||
|
||||
static int __init module_init(void)
|
||||
static int __init module_initial(void)
|
||||
{
|
||||
printk(KERN_ALERT "Hello, world\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void module_exit(void)
|
||||
static void module_cleanup(void)
|
||||
{
|
||||
printk(KERN_ALERT "Goodbye, cruel world\n");
|
||||
}
|
||||
|
||||
|
||||
module_init(module_init);
|
||||
module_exit(module_exit);
|
||||
module_init(module_initial);
|
||||
module_exit(module_cleanup);
|
||||
|
|
Loading…
Reference in New Issue