Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
4263cf0f
K
Kernel
项目概览
openeuler
/
Kernel
12 个月 前同步成功
通知
5
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
4263cf0f
编写于
9月 14, 2006
作者:
D
Dmitry Torokhov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Input: make input_register_handler() return error codes
Signed-off-by:
N
Dmitry Torokhov
<
dtor@mail.ru
>
上级
68c2a160
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
34 addition
and
22 deletion
+34
-22
drivers/char/keyboard.c
drivers/char/keyboard.c
+4
-1
drivers/input/evbug.c
drivers/input/evbug.c
+1
-2
drivers/input/evdev.c
drivers/input/evdev.c
+1
-2
drivers/input/input.c
drivers/input/input.c
+7
-5
drivers/input/joydev.c
drivers/input/joydev.c
+1
-2
drivers/input/mousedev.c
drivers/input/mousedev.c
+17
-4
drivers/input/power.c
drivers/input/power.c
+1
-2
drivers/input/tsdev.c
drivers/input/tsdev.c
+1
-3
include/linux/input.h
include/linux/input.h
+1
-1
未找到文件。
drivers/char/keyboard.c
浏览文件 @
4263cf0f
...
...
@@ -1362,6 +1362,7 @@ static struct input_handler kbd_handler = {
int
__init
kbd_init
(
void
)
{
int
i
;
int
error
;
for
(
i
=
0
;
i
<
MAX_NR_CONSOLES
;
i
++
)
{
kbd_table
[
i
].
ledflagstate
=
KBD_DEFLEDS
;
...
...
@@ -1373,7 +1374,9 @@ int __init kbd_init(void)
kbd_table
[
i
].
kbdmode
=
VC_XLATE
;
}
input_register_handler
(
&
kbd_handler
);
error
=
input_register_handler
(
&
kbd_handler
);
if
(
error
)
return
error
;
tasklet_enable
(
&
keyboard_tasklet
);
tasklet_schedule
(
&
keyboard_tasklet
);
...
...
drivers/input/evbug.c
浏览文件 @
4263cf0f
...
...
@@ -91,8 +91,7 @@ static struct input_handler evbug_handler = {
static
int
__init
evbug_init
(
void
)
{
input_register_handler
(
&
evbug_handler
);
return
0
;
return
input_register_handler
(
&
evbug_handler
);
}
static
void
__exit
evbug_exit
(
void
)
...
...
drivers/input/evdev.c
浏览文件 @
4263cf0f
...
...
@@ -695,8 +695,7 @@ static struct input_handler evdev_handler = {
static
int
__init
evdev_init
(
void
)
{
input_register_handler
(
&
evdev_handler
);
return
0
;
return
input_register_handler
(
&
evdev_handler
);
}
static
void
__exit
evdev_exit
(
void
)
...
...
drivers/input/input.c
浏览文件 @
4263cf0f
...
...
@@ -1037,19 +1037,20 @@ void input_unregister_device(struct input_dev *dev)
}
EXPORT_SYMBOL
(
input_unregister_device
);
void
input_register_handler
(
struct
input_handler
*
handler
)
int
input_register_handler
(
struct
input_handler
*
handler
)
{
struct
input_dev
*
dev
;
struct
input_handle
*
handle
;
const
struct
input_device_id
*
id
;
if
(
!
handler
)
return
;
INIT_LIST_HEAD
(
&
handler
->
h_list
);
if
(
handler
->
fops
!=
NULL
)
if
(
handler
->
fops
!=
NULL
)
{
if
(
input_table
[
handler
->
minor
>>
5
])
return
-
EBUSY
;
input_table
[
handler
->
minor
>>
5
]
=
handler
;
}
list_add_tail
(
&
handler
->
node
,
&
input_handler_list
);
...
...
@@ -1063,6 +1064,7 @@ void input_register_handler(struct input_handler *handler)
}
input_wakeup_procfs_readers
();
return
0
;
}
EXPORT_SYMBOL
(
input_register_handler
);
...
...
drivers/input/joydev.c
浏览文件 @
4263cf0f
...
...
@@ -606,8 +606,7 @@ static struct input_handler joydev_handler = {
static
int
__init
joydev_init
(
void
)
{
input_register_handler
(
&
joydev_handler
);
return
0
;
return
input_register_handler
(
&
joydev_handler
);
}
static
void
__exit
joydev_exit
(
void
)
...
...
drivers/input/mousedev.c
浏览文件 @
4263cf0f
...
...
@@ -738,7 +738,12 @@ static int psaux_registered;
static
int
__init
mousedev_init
(
void
)
{
input_register_handler
(
&
mousedev_handler
);
struct
class_device
*
cdev
;
int
error
;
error
=
input_register_handler
(
&
mousedev_handler
);
if
(
error
)
return
error
;
memset
(
&
mousedev_mix
,
0
,
sizeof
(
struct
mousedev
));
INIT_LIST_HEAD
(
&
mousedev_mix
.
list
);
...
...
@@ -747,12 +752,20 @@ static int __init mousedev_init(void)
mousedev_mix
.
exist
=
1
;
mousedev_mix
.
minor
=
MOUSEDEV_MIX
;
class_device_create
(
&
input_class
,
NULL
,
c
dev
=
c
lass_device_create
(
&
input_class
,
NULL
,
MKDEV
(
INPUT_MAJOR
,
MOUSEDEV_MINOR_BASE
+
MOUSEDEV_MIX
),
NULL
,
"mice"
);
if
(
IS_ERR
(
cdev
))
{
input_unregister_handler
(
&
mousedev_handler
);
return
PTR_ERR
(
cdev
);
}
#ifdef CONFIG_INPUT_MOUSEDEV_PSAUX
if
(
!
(
psaux_registered
=
!
misc_register
(
&
psaux_mouse
)))
printk
(
KERN_WARNING
"mice: could not misc_register the device
\n
"
);
error
=
misc_register
(
&
psaux_mouse
);
if
(
error
)
printk
(
KERN_WARNING
"mice: could not register psaux device, "
"error: %d
\n
"
,
error
);
else
psaux_registered
=
1
;
#endif
printk
(
KERN_INFO
"mice: PS/2 mouse device common for all mice
\n
"
);
...
...
drivers/input/power.c
浏览文件 @
4263cf0f
...
...
@@ -150,8 +150,7 @@ static struct input_handler power_handler = {
static
int
__init
power_init
(
void
)
{
input_register_handler
(
&
power_handler
);
return
0
;
return
input_register_handler
(
&
power_handler
);
}
static
void
__exit
power_exit
(
void
)
...
...
drivers/input/tsdev.c
浏览文件 @
4263cf0f
...
...
@@ -479,9 +479,7 @@ static struct input_handler tsdev_handler = {
static
int
__init
tsdev_init
(
void
)
{
input_register_handler
(
&
tsdev_handler
);
printk
(
KERN_INFO
"ts: Compaq touchscreen protocol output
\n
"
);
return
0
;
return
input_register_handler
(
&
tsdev_handler
);
}
static
void
__exit
tsdev_exit
(
void
)
...
...
include/linux/input.h
浏览文件 @
4263cf0f
...
...
@@ -1106,7 +1106,7 @@ static inline void input_put_device(struct input_dev *dev)
int
input_register_device
(
struct
input_dev
*
);
void
input_unregister_device
(
struct
input_dev
*
);
void
input_register_handler
(
struct
input_handler
*
);
int
input_register_handler
(
struct
input_handler
*
);
void
input_unregister_handler
(
struct
input_handler
*
);
int
input_grab_device
(
struct
input_handle
*
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录