学习《Linux设备模型浅析之设备篇》笔记(深挖二)
来源:互联网 发布:php random int 编辑:程序博客网 时间:2024/05/16 00:43
/**
* platform_add_devices - 添加一些platform设备
* @devs: 要添加的platform设备的队列
* @num: platform设备队列的书目
*/
int platform_add_devices(struct platform_device **devs, int num)
{
int i, ret = 0;
for (i = 0; i < num; i++) {
ret = platform_device_register(devs[i]);
if (ret) {
while (--i >= 0)
platform_device_unregister(devs[i]);
break;
}
}
return ret;
}
* platform_add_devices - 添加一些platform设备
* @devs: 要添加的platform设备的队列
* @num: platform设备队列的书目
*/
int platform_add_devices(struct platform_device **devs, int num)
{
int i, ret = 0;
for (i = 0; i < num; i++) {
ret = platform_device_register(devs[i]);
if (ret) {
while (--i >= 0)
platform_device_unregister(devs[i]);
break;
}
}
return ret;
}
EXPORT_SYMBOL_GPL(platform_add_devices);
/**
* platform_device_register - 添加一个platform-level设备
* @pdev: 正在添加的platform设备
*/
int platform_device_register(struct platform_device *pdev)
{
device_initialize(&pdev->dev);
arch_setup_pdev_archdata(pdev);
return platform_device_add(pdev);
}
0 0
- 学习《Linux设备模型浅析之设备篇》笔记(深挖二)
- 学习《Linux设备模型浅析之设备篇》笔记(深挖一)
- 学习《Linux设备模型浅析之设备篇》笔记(二)
- 学习《Linux设备模型浅析之设备篇》笔记(一)
- 学习《Linux设备模型浅析之设备篇》笔记(三)
- 学习《Linux设备模型浅析之驱动篇》笔记(一)
- Linux设备模型浅析之设备
- Linux设备模型浅析之驱动篇
- Linux 设备模型浅析之 uevent 篇
- Linux设备模型浅析之uevent篇
- Linux 设备模型浅析之 uevent 篇
- Linux设备模型浅析之uevent篇
- Linux设备驱动程序学习之设备模型二
- linux设备模型浅析
- linux设备模型浅析
- linux 设备模型浅析
- Linux设备模型浅析之固件篇
- Linux设备模型浅析之uevent篇图片版
- 安装Eclipse需要配置JAVA_HOME,PATH等环境变量吗
- tomcat启动时间修改
- android自定义viewgroup实现等分格子布局
- 递归设计
- GlusterFs文件系统
- 学习《Linux设备模型浅析之设备篇》笔记(深挖二)
- 主函数中的局部变量定义时容易出现的问题
- centos6 can't mount ntfs
- arp病毒系列——攻击类型
- leetcode:Word Ladder
- linux下特殊的进程号
- HDU 1661 Assigments 贪心法题解
- [Unity3D]脚本中Start()和Awake()的区别
- 计算机学院研发------考核之界面