get_device和put_device ,以及of_node_get <->of_node_put
来源:互联网 发布:sql连表update 编辑:程序博客网 时间:2024/06/04 01:05
get_device和put_device是一对相反的操作,get_device是对设备的引用数量加1,而put_device是对对象引用数减1。这个名字和popular的理解不太一样,一般getxxx应该是返回一个设备对象。
struct device *get_device(struct device *dev)
{
return dev ? kobj_to_dev(kobject_get(&dev->kobj)) : NULL;
}
/**
* put_device - decrement reference count.
* @dev: device in question.
*/
void put_device(struct device *dev)
{
/* might_sleep(); */
if (dev)
kobject_put(&dev->kobj);
}
与此同时of_node_get <->of_node_put实现了同样的上述功能。
0 0
- get_device和put_device ,以及of_node_get <->of_node_put
- &&和||以及(){}
- 法规和信任以及
- "&" 和 "&&" 以及 "|" 和 "||"的区别
- &&和&以及||和|的区别
- && 和 & 以及 |和|| 的区别
- && 和&以及|和||的区别
- SDK和MFC以及API
- snort和scapy以及hping
- PLS_INTEGER和BINARY_INTEGER以及NUMBER
- sstream和strstream以及fstream
- new和delete,以及指针
- HTML5以及WebGL和Canvas
- NULL和0以及'\0'
- 进程和线程以及区别
- java和 javaw 以及 javaws
- SAE 和 AWS 以及其它
- libusb和libusbk以及winusb
- LR_函数
- 在roscore时出现 terminate called after throwing an instance of 'std::runtime_error'的解决方法
- 为FragmentDialog添加转场动画
- Codeforces 652C Foe Pairs【二分+RMQ】好像这题Dp做法很多啊
- [LeetCode]167. Two Sum II
- get_device和put_device ,以及of_node_get <->of_node_put
- (dwz)打开一个页面,再打开另一个页面,input框中出现本该隐藏的内容
- http接口幂等性
- keepalived+nginx实现高可用负载均衡部署
- 深入理解Lua的全局变量_G以及源码实现
- log4j详解与实战
- 从零开始搭建iOS项目框架
- 车牌定位算法
- android.database.sqlite.SQLiteCantOpenDatabaseException: unable to open database file (code 14)