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