赞
踩
*************************************************************
/*
* usb class driver info in order to get a minor number from the usb core,
* and to have the device registered with the driver core
*/ **usb 类驱动 信息 使我们 能 从usb core usb核 得到一个次 设备
**从而可以 使 设备被 注册 到 驱动内核中
static struct usb_class_driver skel_class = {
.name = "skel%d",
.fops = &skel_fops,
.minor_base = USB_SKEL_MINOR_BASE, **开始的此设备号
};
对于字符设备而言,usb_class_driver 结构体的fops成员中的write read ioctl等 函数的地位完全等于 详解 第6章 中的 file_operations
如果是其他类型的设备,如tty设备,则调用对应设备的注册函数
*************************************************************
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。