Chinaunix首页 | 论坛 | 博客
  • 博客访问: 203257
  • 博文数量: 33
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 1277
  • 用 户 组: 普通用户
  • 注册时间: 2013-03-03 10:03
个人简介

现于杭州电子科技大学攻读硕士学位

文章分类

全部博文(33)

文章存档

2013年(33)

我的朋友

分类: LINUX

2013-09-07 17:26:51

 *miscdevice在本质上仍然属于字符设备,只是被增加了一层封装而已
 *
 *
 *相关结构和接口函数在miscdevice.h和misc.c中定义
 */
#include

struct miscdevice  {
 int minor;             /* 次设备号 */
 const char *name;       /* 设备名字 */
 const struct file_operations *fops;  /* 操作函数 */
 struct list_head list;   /* 同一类设备的链表 */
 struct device *parent;    /* 父设备 */
 struct device *this_device;  /* 本设备 */
};

int misc_register(struct miscdevice * misc); //注册miscdevice
int misc_deregister(struct miscdevice *misc); //注销miscdevice
/****************************************************end**********************************************************************/

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