全部博文(674)
标题 | 阅读 | 评论 | 转发 | 发布日期 | |
---|---|---|---|---|---|
BCM4330 WIFI 调试记录 | 1525 | 0 | 0 | 2012-07-13 | |
RT73 wifi无线网卡驱动移植过程 . | 1774 | 0 | 1 | 2012-04-18 | |
wpa_supplicant加密key设置总结 | 2278 | 0 | 0 | 2012-03-15 | |
wpa_supplicant软件架构分析 | 2733 | 0 | 6 | 2012-03-15 | |
wireless extention扩展接口 | 1778 | 0 | 0 | 2012-02-17 | |
wl12xx on the Google Android Dev Phone 1 | 1856 | 0 | 0 | 2012-01-30 | |
Tenda W541U V2.0 Wireless USB Adapter / Ralink RT2070 How To | 2516 | 0 | 0 | 2011-12-22 | |
ubuntu下腾达W541U V2.0 无线网卡驱动的使用 | 1795 | 0 | 0 | 2011-12-01 | |
ubuntu linux 网络设置详解 | 889 | 0 | 0 | 2011-11-24 | |
Wireless tools for Linux 的一些资料收集 | 600 | 0 | 1 | 2011-11-24 | |
WIFI环境搭建 | 824 | 0 | 1 | 2011-11-24 | |
wifi连接流程分析 | 1191 | 0 | 1 | 2011-11-23 | |
WIFI扫描流程分析 | 1353 | 0 | 1 | 2011-11-23 | |
Marvell 8686 wifi 模块的移植 | 2894 | 0 | 0 | 2011-11-22 | |
SSID、BSSID、ESSID的区别 | 1646 | 0 | 0 | 2011-11-09 | |
谈谈Android中WIFI 架构和控制流程 | 1090 | 0 | 1 | 2011-11-07 | |
在Android中监视wifi状态 | 1375 | 0 | 1 | 2011-11-04 | |
Android WiFi 电源管理 | 868 | 0 | 0 | 2011-11-04 | |
wifi移植全过程记录 | 2560 | 0 | 1 | 2011-10-24 | |
【推荐】 WIFI模块 | 1577 | 0 | 2 | 2011-10-21 |
chen_chuang2012-10-11 16:33
高手,有本书上写cdev初始化和注册是这样写的
static void VirtualDisk_setup_cdev(struct VirtualDisk *dev, int minor)
{
int err;
devno = MDDEV(VirtualDisk_major, minor);
cdev_init(&dev->cdev, &VirtualDisk_fops);
dev->cdev.owner = THIS_MOUDULE;
dev->cdev.ops = &VirtualDisk_fops;
err = cdev_add(&dev->cdev, debno, 1);
if (err)
printk(KERN_NOTICE "Error in cdev_add()\n");
}
而cdev_init里
void cdev_init(struct cdev *cdev, const struct file_operations *fops)
{
memset(cdev, 0, sizeof *cdev);
INIT_LIST_HEAD(&cdev->list);
kobject_init(&cdev->kobj, &ktype_cdev_default);
cdev->ops = fops;
}
已经有cdev->ops = fops了
那上面的代码cdev_init之后又有dev->cdev.ops ,这两个函数不一样吗,自我感觉有点多次一举,,,不太明白