博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Linux Kernel input 子系统初始化
阅读量:4152 次
发布时间:2019-05-25

本文共 685 字,大约阅读时间需要 2 分钟。

 
static int __init input_init(void){	int err;	err = class_register(&input_class);	if (err) {		pr_err("unable to register input_dev class\n");		return err;	}	err = input_proc_init();	if (err)		goto fail1;	err = register_chrdev_region(MKDEV(INPUT_MAJOR, 0),				     INPUT_MAX_CHAR_DEVICES, "input");	if (err) {		pr_err("unable to register char major %d", INPUT_MAJOR);		goto fail2;	}	return 0; fail2:	input_proc_exit(); fail1:	class_unregister(&input_class);	return err;}static void __exit input_exit(void){	input_proc_exit();	unregister_chrdev_region(MKDEV(INPUT_MAJOR, 0),				 INPUT_MAX_CHAR_DEVICES);	class_unregister(&input_class);}subsys_initcall(input_init);module_exit(input_exit);

转载地址:http://owhti.baihongyu.com/

你可能感兴趣的文章
九度:题目1017:还是畅通工程
查看>>
九度:题目1034:寻找大富翁
查看>>
第六章 背包问题——01背包
查看>>
51nod 分类
查看>>
1136 . 欧拉函数
查看>>
面试题:强制类型转换
查看>>
Decorator模式
查看>>
Template模式
查看>>
Observer模式
查看>>
高性能服务器设计
查看>>
性能扩展问题要趁早
查看>>
MySQL-数据库、数据表结构操作(SQL)
查看>>
OpenLDAP for Windows 安装手册(2.4.26版)
查看>>
图文介绍openLDAP在windows上的安装配置
查看>>
Pentaho BI开源报表系统
查看>>
Pentaho 开发: 在eclipse中构建Pentaho BI Server工程
查看>>
JSP的内置对象及方法
查看>>
android中SharedPreferences的简单例子
查看>>
android中使用TextView来显示某个网址的内容,使用<ScrollView>来生成下拉列表框
查看>>
andorid里关于wifi的分析
查看>>