cannot insmoe workqueue: module already loaded, even though lsmod says otherwise

This commit is contained in:
Ciro Santilli
2017-05-14 11:24:28 +01:00
parent 67f669487e
commit c4b4f029d4
2 changed files with 14 additions and 1 deletions

View File

@@ -1,4 +1,4 @@
obj-m += $(addsuffix .o, $(notdir $(basename $(wildcard $(BR2_EXTERNAL_KERNEL_MODULE_PATH)/*.c))))
obj-m += workqueue.o
ccflags-y := -Wno-declaration-after-statement -std=gnu99
.PHONY: all clean

13
kernel_module/workqueue.c Normal file
View File

@@ -0,0 +1,13 @@
#include <linux/module.h>
#include <linux/kernel.h>
int init_module(void)
{
printk(KERN_INFO "hello init\n");
return 0;
}
void cleanup_module(void)
{
printk(KERN_INFO "hello cleanup\n");
}