1
0
mirror of https://github.com/sysprog21/lkmpg.git synced 2021-08-03 01:33:29 +03:00

Add LaTeX script and sample code

This commit is contained in:
Jim Huang
2021-07-22 06:35:24 +08:00
parent 826b45b3d9
commit 2246e20809
39 changed files with 4310 additions and 0 deletions

25
examples/hello-4.c Normal file
View File

@@ -0,0 +1,25 @@
/*
* hello-4.c - Demonstrates module documentation.
*/
#include <linux/module.h> /* Needed by all modules */
#include <linux/kernel.h> /* Needed for KERN_INFO */
#include <linux/init.h> /* Needed for the macros */
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Bob Mottram");
MODULE_DESCRIPTION("A sample driver");
MODULE_SUPPORTED_DEVICE("testdevice");
static int __init init_hello_4(void)
{
pr_info("Hello, world 4\n");
return 0;
}
static void __exit cleanup_hello_4(void)
{
pr_info("Goodbye, world 4\n");
}
module_init(init_hello_4);
module_exit(cleanup_hello_4);