Linux Kernel input设备之分配input设备
来源:互联网 发布:ajax获取servlet中json 编辑:程序博客网 时间:2024/04/27 08:52
/**
* input_allocate_device - allocate memory for new input device * * Returns prepared struct input_dev or %NULL. * * NOTE: Use input_free_device() to free devices that have not been * registered; input_unregister_device() should be used for already * registered devices. */struct input_dev *input_allocate_device(void){static atomic_t input_no = ATOMIC_INIT(-1);struct input_dev *dev;dev = kzalloc(sizeof(struct input_dev), GFP_KERNEL);if (dev) {dev->dev.type = &input_dev_type;dev->dev.class = &input_class;device_initialize(&dev->dev);mutex_init(&dev->mutex);spin_lock_init(&dev->event_lock);init_timer(&dev->timer);INIT_LIST_HEAD(&dev->h_list);INIT_LIST_HEAD(&dev->node);dev_set_name(&dev->dev, "input%lu", (unsigned long)atomic_inc_return(&input_no));__module_get(THIS_MODULE);}return dev;}
0 0
- Linux Kernel input设备之分配input设备
- Linux Kernel input设备之input设备注册
- Linux Kernel input设备之描述
- Linux Kernel input设备之handler
- Linux Kernel input设备之handler注册
- Linux Kernel input设备之handle注册
- linux驱动之input设备
- linux input设备
- Linux Input 设备驱动
- linux input设备驱动
- linux input设备驱动 .
- linux input设备驱动
- linux ------ 闲聊input设备
- linux input设备驱动
- Linux Input 设备驱动
- Linux input设备驱动
- Linux Input 设备驱动
- Linux设备模型之input子系统详解
- A + B 问题
- C++知识体系
- 招人面试
- 搜索引擎的工作原理
- IP地址转换:数字与字符串之间的转换
- Linux Kernel input设备之分配input设备
- CodeForces
- 使用x-studio365导入csb并发布到CocosStudio2.x兼容工程
- 《Wavelet Theory:An elementary Approach With Applications》中关于例6.10的疑惑
- “三天打鱼,两天晒网”______日期计算及判定,文本输入输出C++程序
- linux 线程同步问题
- Typedef用法
- ffplay中stream_component_open()函数分析
- springboot的注解@EnableAspectJAutoProxy讲解