Chinaunix首页 | 论坛 | 博客
  • 博客访问: 7565292
  • 博文数量: 961
  • 博客积分: 15795
  • 博客等级: 上将
  • 技术积分: 16612
  • 用 户 组: 普通用户
  • 注册时间: 2010-08-07 14:23
文章分类

全部博文(961)

文章存档

2016年(1)

2015年(61)

2014年(41)

2013年(51)

2012年(235)

2011年(391)

2010年(181)

分类: 嵌入式

2011-09-26 12:01:49

/*

 * Hello Word驱动程序

 * Lzy 2011-9-26

 */

 

#include   /* 模块加载函数和模块释放函数的宏定义*/

#include    /* 加载模块需要使用的大量符号和函数定义*/

 

static int __init hello_init(void)

{

    printk("Hello Word\n");

    return 0;

}

 

static void __exit hello_exit(void)

{

    printk("GoodBye Word\n");

    return ;

}

 

module_init(hello_init); /* 指定模块加载函数*/

module_exit(hello_exit); /* 指定模块卸载函数*/

MODULE_LICENSE("GPL");      /* 指定许可权为GPL*/

 

源代码: hello.rar   

 

阅读(1245) | 评论(0) | 转发(3) |
给主人留下些什么吧!~~