Use module_init, mention modprobe on readme

This commit is contained in:
Ciro Santilli
2017-06-06 08:08:31 +01:00
parent 7f9807ce45
commit 9337ea98d8
19 changed files with 116 additions and 48 deletions

View File

@@ -46,7 +46,7 @@ static int kthread_func2(void *data)
return 0;
}
int init_module(void)
static int myinit(void)
{
init_waitqueue_head(&queue);
kthread1 = kthread_create(kthread_func1, NULL, "mykthread1");
@@ -56,8 +56,11 @@ int init_module(void)
return 0;
}
void cleanup_module(void)
static void myexit(void)
{
kthread_stop(kthread1);
kthread_stop(kthread2);
}
module_init(myinit)
module_exit(myexit)