Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
1235686f
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
1235686f
编写于
3月 15, 2005
作者:
G
gregkh@suse.de
提交者:
Greg Kroah-Hartman
6月 20, 2005
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[PATCH] INPUT: move to use the new class code, instead of class_simple
Signed-off-by:
N
Greg Kroah-Hartman
<
gregkh@suse.de
>
上级
7fe845d1
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
29 addition
and
25 deletion
+29
-25
drivers/input/evdev.c
drivers/input/evdev.c
+5
-4
drivers/input/input.c
drivers/input/input.c
+5
-5
drivers/input/joydev.c
drivers/input/joydev.c
+4
-4
drivers/input/mousedev.c
drivers/input/mousedev.c
+9
-7
drivers/input/tsdev.c
drivers/input/tsdev.c
+5
-4
include/linux/input.h
include/linux/input.h
+1
-1
未找到文件。
drivers/input/evdev.c
浏览文件 @
1235686f
...
...
@@ -431,9 +431,9 @@ static struct input_handle *evdev_connect(struct input_handler *handler, struct
devfs_mk_cdev
(
MKDEV
(
INPUT_MAJOR
,
EVDEV_MINOR_BASE
+
minor
),
S_IFCHR
|
S_IRUGO
|
S_IWUSR
,
"input/event%d"
,
minor
);
class_
simple_device_add
(
input_class
,
MKDEV
(
INPUT_MAJOR
,
EVDEV_MINOR_BASE
+
minor
),
dev
->
dev
,
"event%d"
,
minor
);
class_
device_create
(
input_class
,
MKDEV
(
INPUT_MAJOR
,
EVDEV_MINOR_BASE
+
minor
),
dev
->
dev
,
"event%d"
,
minor
);
return
&
evdev
->
handle
;
}
...
...
@@ -443,7 +443,8 @@ static void evdev_disconnect(struct input_handle *handle)
struct
evdev
*
evdev
=
handle
->
private
;
struct
evdev_list
*
list
;
class_simple_device_remove
(
MKDEV
(
INPUT_MAJOR
,
EVDEV_MINOR_BASE
+
evdev
->
minor
));
class_device_destroy
(
input_class
,
MKDEV
(
INPUT_MAJOR
,
EVDEV_MINOR_BASE
+
evdev
->
minor
));
devfs_remove
(
"input/event%d"
,
evdev
->
minor
);
evdev
->
exist
=
0
;
...
...
drivers/input/input.c
浏览文件 @
1235686f
...
...
@@ -702,13 +702,13 @@ static int __init input_proc_init(void)
static
inline
int
input_proc_init
(
void
)
{
return
0
;
}
#endif
struct
class
_simple
*
input_class
;
struct
class
*
input_class
;
static
int
__init
input_init
(
void
)
{
int
retval
=
-
ENOMEM
;
input_class
=
class_
simple_
create
(
THIS_MODULE
,
"input"
);
input_class
=
class_create
(
THIS_MODULE
,
"input"
);
if
(
IS_ERR
(
input_class
))
return
PTR_ERR
(
input_class
);
input_proc_init
();
...
...
@@ -718,7 +718,7 @@ static int __init input_init(void)
remove_proc_entry
(
"devices"
,
proc_bus_input_dir
);
remove_proc_entry
(
"handlers"
,
proc_bus_input_dir
);
remove_proc_entry
(
"input"
,
proc_bus
);
class_
simple_
destroy
(
input_class
);
class_destroy
(
input_class
);
return
retval
;
}
...
...
@@ -728,7 +728,7 @@ static int __init input_init(void)
remove_proc_entry
(
"handlers"
,
proc_bus_input_dir
);
remove_proc_entry
(
"input"
,
proc_bus
);
unregister_chrdev
(
INPUT_MAJOR
,
"input"
);
class_
simple_
destroy
(
input_class
);
class_destroy
(
input_class
);
}
return
retval
;
}
...
...
@@ -741,7 +741,7 @@ static void __exit input_exit(void)
devfs_remove
(
"input"
);
unregister_chrdev
(
INPUT_MAJOR
,
"input"
);
class_
simple_
destroy
(
input_class
);
class_destroy
(
input_class
);
}
subsys_initcall
(
input_init
);
...
...
drivers/input/joydev.c
浏览文件 @
1235686f
...
...
@@ -452,9 +452,9 @@ static struct input_handle *joydev_connect(struct input_handler *handler, struct
devfs_mk_cdev
(
MKDEV
(
INPUT_MAJOR
,
JOYDEV_MINOR_BASE
+
minor
),
S_IFCHR
|
S_IRUGO
|
S_IWUSR
,
"input/js%d"
,
minor
);
class_
simple_device_add
(
input_class
,
MKDEV
(
INPUT_MAJOR
,
JOYDEV_MINOR_BASE
+
minor
),
dev
->
dev
,
"js%d"
,
minor
);
class_
device_create
(
input_class
,
MKDEV
(
INPUT_MAJOR
,
JOYDEV_MINOR_BASE
+
minor
),
dev
->
dev
,
"js%d"
,
minor
);
return
&
joydev
->
handle
;
}
...
...
@@ -464,7 +464,7 @@ static void joydev_disconnect(struct input_handle *handle)
struct
joydev
*
joydev
=
handle
->
private
;
struct
joydev_list
*
list
;
class_
simple_device_remove
(
MKDEV
(
INPUT_MAJOR
,
JOYDEV_MINOR_BASE
+
joydev
->
minor
));
class_
device_destroy
(
input_class
,
MKDEV
(
INPUT_MAJOR
,
JOYDEV_MINOR_BASE
+
joydev
->
minor
));
devfs_remove
(
"input/js%d"
,
joydev
->
minor
);
joydev
->
exist
=
0
;
...
...
drivers/input/mousedev.c
浏览文件 @
1235686f
...
...
@@ -647,9 +647,9 @@ static struct input_handle *mousedev_connect(struct input_handler *handler, stru
devfs_mk_cdev
(
MKDEV
(
INPUT_MAJOR
,
MOUSEDEV_MINOR_BASE
+
minor
),
S_IFCHR
|
S_IRUGO
|
S_IWUSR
,
"input/mouse%d"
,
minor
);
class_
simple_device_add
(
input_class
,
MKDEV
(
INPUT_MAJOR
,
MOUSEDEV_MINOR_BASE
+
minor
),
dev
->
dev
,
"mouse%d"
,
minor
);
class_
device_create
(
input_class
,
MKDEV
(
INPUT_MAJOR
,
MOUSEDEV_MINOR_BASE
+
minor
),
dev
->
dev
,
"mouse%d"
,
minor
);
return
&
mousedev
->
handle
;
}
...
...
@@ -659,7 +659,8 @@ static void mousedev_disconnect(struct input_handle *handle)
struct
mousedev
*
mousedev
=
handle
->
private
;
struct
mousedev_list
*
list
;
class_simple_device_remove
(
MKDEV
(
INPUT_MAJOR
,
MOUSEDEV_MINOR_BASE
+
mousedev
->
minor
));
class_device_destroy
(
input_class
,
MKDEV
(
INPUT_MAJOR
,
MOUSEDEV_MINOR_BASE
+
mousedev
->
minor
));
devfs_remove
(
"input/mouse%d"
,
mousedev
->
minor
);
mousedev
->
exist
=
0
;
...
...
@@ -735,8 +736,8 @@ static int __init mousedev_init(void)
devfs_mk_cdev
(
MKDEV
(
INPUT_MAJOR
,
MOUSEDEV_MINOR_BASE
+
MOUSEDEV_MIX
),
S_IFCHR
|
S_IRUGO
|
S_IWUSR
,
"input/mice"
);
class_
simple_device_add
(
input_class
,
MKDEV
(
INPUT_MAJOR
,
MOUSEDEV_MINOR_BASE
+
MOUSEDEV_MIX
)
,
NULL
,
"mice"
);
class_
device_create
(
input_class
,
MKDEV
(
INPUT_MAJOR
,
MOUSEDEV_MINOR_BASE
+
MOUSEDEV_MIX
),
NULL
,
"mice"
);
#ifdef CONFIG_INPUT_MOUSEDEV_PSAUX
if
(
!
(
psaux_registered
=
!
misc_register
(
&
psaux_mouse
)))
...
...
@@ -755,7 +756,8 @@ static void __exit mousedev_exit(void)
misc_deregister
(
&
psaux_mouse
);
#endif
devfs_remove
(
"input/mice"
);
class_simple_device_remove
(
MKDEV
(
INPUT_MAJOR
,
MOUSEDEV_MINOR_BASE
+
MOUSEDEV_MIX
));
class_device_destroy
(
input_class
,
MKDEV
(
INPUT_MAJOR
,
MOUSEDEV_MINOR_BASE
+
MOUSEDEV_MIX
));
input_unregister_handler
(
&
mousedev_handler
);
}
...
...
drivers/input/tsdev.c
浏览文件 @
1235686f
...
...
@@ -414,9 +414,9 @@ static struct input_handle *tsdev_connect(struct input_handler *handler,
S_IFCHR
|
S_IRUGO
|
S_IWUSR
,
"input/ts%d"
,
minor
);
devfs_mk_cdev
(
MKDEV
(
INPUT_MAJOR
,
TSDEV_MINOR_BASE
+
minor
+
TSDEV_MINORS
/
2
),
S_IFCHR
|
S_IRUGO
|
S_IWUSR
,
"input/tsraw%d"
,
minor
);
class_
simple_device_add
(
input_class
,
MKDEV
(
INPUT_MAJOR
,
TSDEV_MINOR_BASE
+
minor
),
dev
->
dev
,
"ts%d"
,
minor
);
class_
device_create
(
input_class
,
MKDEV
(
INPUT_MAJOR
,
TSDEV_MINOR_BASE
+
minor
),
dev
->
dev
,
"ts%d"
,
minor
);
return
&
tsdev
->
handle
;
}
...
...
@@ -426,7 +426,8 @@ static void tsdev_disconnect(struct input_handle *handle)
struct
tsdev
*
tsdev
=
handle
->
private
;
struct
tsdev_list
*
list
;
class_simple_device_remove
(
MKDEV
(
INPUT_MAJOR
,
TSDEV_MINOR_BASE
+
tsdev
->
minor
));
class_device_destroy
(
input_class
,
MKDEV
(
INPUT_MAJOR
,
TSDEV_MINOR_BASE
+
tsdev
->
minor
));
devfs_remove
(
"input/ts%d"
,
tsdev
->
minor
);
devfs_remove
(
"input/tsraw%d"
,
tsdev
->
minor
);
tsdev
->
exist
=
0
;
...
...
include/linux/input.h
浏览文件 @
1235686f
...
...
@@ -1015,7 +1015,7 @@ static inline void input_set_abs_params(struct input_dev *dev, int axis, int min
dev
->
absbit
[
LONG
(
axis
)]
|=
BIT
(
axis
);
}
extern
struct
class
_simple
*
input_class
;
extern
struct
class
*
input_class
;
#endif
#endif
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录