Linux Kernel设备驱动模型之设备注册
2017-03-27 08:04
459 查看
设备模型之设备注册:
/** * device_register - register a device with the system. * @dev: pointer to the device structure * * This happens in two clean steps - initialize the device * and add it to the system. The two steps can be called * separately, but this is the easiest and most common. * I.e. you should only call the two helpers separately if * have a clearly defined need to use and refcount the device * before it is added to the hierarchy. * * For more information, see the kerneldoc for device_initialize() * and device_add(). * * NOTE: _Never_ directly free @dev after calling this function, even * if it returned an error! Always use put_device() to give up the * reference initialized in this function instead. */ int device_register(struct device *dev) { device_initialize(dev); return device_add(dev); } EXPORT_SYMBOL_GPL(device_register);
相关文章推荐
- Linux Kernel设备驱动模型之驱动注册
- Linux Kernel设备驱动模型之class 接口注册
- Linux Kernel设备驱动模型之class注册
- Linux Kernel设备驱动模型之 总线注册
- Linux Kernel设备驱动模型之 平台驱动注册
- Linux Kernel设备驱动模型之子系统注册
- Linux Kernel设备驱动模型之 平台设备注册
- Linux Kernel设备驱动模型之子系统接口注册
- Linux Kernel设备驱动模型之CPU接口注册
- Linux Kernel 学习笔记16:总线设备驱动模型
- Linux Kernel设备驱动模型之class 初始化
- Linux Kernel设备驱动模型之设备初始化
- Linux Kernel设备驱动模型之class 查找设备
- Linux kernel -- 设备驱动模型
- Linux Kernel设备驱动模型之总线查找设备
- Linux Kernel设备驱动模型之总线添加设备
- Linux kernel驱动相关抽象概念及其实现 之“linux设备模型kobject,kset,ktype”
- [笔记分享] [OS] Linux设备模型之驱动注册
- linux2.6标准字符设备驱动模型(手动注册)
- Linux Kernel设备驱动模型之 struct device_node