commit | author | age
|
256f95
|
1 |
/********************************************************************************* |
G |
2 |
* Copyright: (C) 2021 LingYun IoT System Studio <www.weike-iot.com> |
|
3 |
* All rights reserved. |
|
4 |
* |
|
5 |
* Filename: hello.c |
|
6 |
* Description: This file is the linux kernel sample hello module |
|
7 |
* |
|
8 |
* Version: 1.0.0(18/12/2021~) |
|
9 |
* Author: Guo Wenxue <guowenxue@gmail.com> |
|
10 |
* ChangeLog: 1, Release initial version on "18/12/2021 10:50:26 AM" |
|
11 |
* |
|
12 |
********************************************************************************/ |
|
13 |
|
|
14 |
#include <linux/init.h> |
|
15 |
#include <linux/module.h> |
|
16 |
#include <linux/kernel.h> |
|
17 |
|
|
18 |
static __init int hello_init(void) |
|
19 |
{ |
|
20 |
printk(KERN_ALERT "Hello, LingYun IoT System Studio!\n"); |
|
21 |
return 0; |
|
22 |
} |
|
23 |
|
|
24 |
static __exit void hello_exit(void) |
|
25 |
{ |
|
26 |
printk(KERN_ALERT "Goodbye, I have found a good job!\n"); |
|
27 |
} |
|
28 |
|
|
29 |
module_init(hello_init); |
|
30 |
module_exit(hello_exit); |
|
31 |
|
|
32 |
MODULE_AUTHOR("GuoWenxue <guowenxue@gmail.com>"); |
|
33 |
MODULE_DESCRIPTION("Linux Kernel hello module"); |
|
34 |
MODULE_LICENSE("Dual BSD/GPL"); |
|
35 |
MODULE_INFO(intree, "Y"); |