Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
66e66118
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看板
提交
66e66118
编写于
9月 14, 2006
作者:
D
Dmitry Torokhov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Input: constify input core
Signed-off-by:
N
Dmitry Torokhov
<
dtor@mail.ru
>
上级
5206c0d5
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
34 addition
and
30 deletion
+34
-30
drivers/char/keyboard.c
drivers/char/keyboard.c
+2
-2
drivers/input/evbug.c
drivers/input/evbug.c
+5
-3
drivers/input/evdev.c
drivers/input/evdev.c
+4
-3
drivers/input/input.c
drivers/input/input.c
+4
-3
drivers/input/joydev.c
drivers/input/joydev.c
+5
-4
drivers/input/mousedev.c
drivers/input/mousedev.c
+4
-3
drivers/input/power.c
drivers/input/power.c
+2
-2
drivers/input/tsdev.c
drivers/input/tsdev.c
+3
-5
include/linux/input.h
include/linux/input.h
+5
-5
未找到文件。
drivers/char/keyboard.c
浏览文件 @
66e66118
...
...
@@ -1285,7 +1285,7 @@ static void kbd_event(struct input_handle *handle, unsigned int event_type,
*/
static
struct
input_handle
*
kbd_connect
(
struct
input_handler
*
handler
,
struct
input_dev
*
dev
,
struct
input_device_id
*
id
)
const
struct
input_device_id
*
id
)
{
struct
input_handle
*
handle
;
int
i
;
...
...
@@ -1334,7 +1334,7 @@ static void kbd_start(struct input_handle *handle)
tasklet_enable
(
&
keyboard_tasklet
);
}
static
struct
input_device_id
kbd_ids
[]
=
{
static
const
struct
input_device_id
kbd_ids
[]
=
{
{
.
flags
=
INPUT_DEVICE_ID_MATCH_EVBIT
,
.
evbit
=
{
BIT
(
EV_KEY
)
},
...
...
drivers/input/evbug.c
浏览文件 @
66e66118
...
...
@@ -42,10 +42,12 @@ static char evbug_name[] = "evbug";
static
void
evbug_event
(
struct
input_handle
*
handle
,
unsigned
int
type
,
unsigned
int
code
,
int
value
)
{
printk
(
KERN_DEBUG
"evbug.c: Event. Dev: %s, Type: %d, Code: %d, Value: %d
\n
"
,
handle
->
dev
->
phys
,
type
,
code
,
value
);
printk
(
KERN_DEBUG
"evbug.c: Event. Dev: %s, Type: %d, Code: %d, Value: %d
\n
"
,
handle
->
dev
->
phys
,
type
,
code
,
value
);
}
static
struct
input_handle
*
evbug_connect
(
struct
input_handler
*
handler
,
struct
input_dev
*
dev
,
struct
input_device_id
*
id
)
static
struct
input_handle
*
evbug_connect
(
struct
input_handler
*
handler
,
struct
input_dev
*
dev
,
const
struct
input_device_id
*
id
)
{
struct
input_handle
*
handle
;
...
...
@@ -72,7 +74,7 @@ static void evbug_disconnect(struct input_handle *handle)
kfree
(
handle
);
}
static
struct
input_device_id
evbug_ids
[]
=
{
static
const
struct
input_device_id
evbug_ids
[]
=
{
{
.
driver_info
=
1
},
/* Matches all devices */
{
},
/* Terminating zero entry */
};
...
...
drivers/input/evdev.c
浏览文件 @
66e66118
...
...
@@ -601,7 +601,7 @@ static long evdev_ioctl_compat(struct file *file, unsigned int cmd, unsigned lon
}
#endif
static
struct
file_operations
evdev_fops
=
{
static
const
struct
file_operations
evdev_fops
=
{
.
owner
=
THIS_MODULE
,
.
read
=
evdev_read
,
.
write
=
evdev_write
,
...
...
@@ -616,7 +616,8 @@ static struct file_operations evdev_fops = {
.
flush
=
evdev_flush
};
static
struct
input_handle
*
evdev_connect
(
struct
input_handler
*
handler
,
struct
input_dev
*
dev
,
struct
input_device_id
*
id
)
static
struct
input_handle
*
evdev_connect
(
struct
input_handler
*
handler
,
struct
input_dev
*
dev
,
const
struct
input_device_id
*
id
)
{
struct
evdev
*
evdev
;
struct
class_device
*
cdev
;
...
...
@@ -675,7 +676,7 @@ static void evdev_disconnect(struct input_handle *handle)
evdev_free
(
evdev
);
}
static
struct
input_device_id
evdev_ids
[]
=
{
static
const
struct
input_device_id
evdev_ids
[]
=
{
{
.
driver_info
=
1
},
/* Matches all devices */
{
},
/* Terminating zero entry */
};
...
...
drivers/input/input.c
浏览文件 @
66e66118
...
...
@@ -313,7 +313,8 @@ static void input_link_handle(struct input_handle *handle)
if (i != NBITS(max)) \
continue;
static
struct
input_device_id
*
input_match_device
(
struct
input_device_id
*
id
,
struct
input_dev
*
dev
)
static
const
struct
input_device_id
*
input_match_device
(
const
struct
input_device_id
*
id
,
struct
input_dev
*
dev
)
{
int
i
;
...
...
@@ -935,7 +936,7 @@ int input_register_device(struct input_dev *dev)
static
atomic_t
input_no
=
ATOMIC_INIT
(
0
);
struct
input_handle
*
handle
;
struct
input_handler
*
handler
;
struct
input_device_id
*
id
;
const
struct
input_device_id
*
id
;
const
char
*
path
;
int
error
;
...
...
@@ -1050,7 +1051,7 @@ void input_register_handler(struct input_handler *handler)
{
struct
input_dev
*
dev
;
struct
input_handle
*
handle
;
struct
input_device_id
*
id
;
const
struct
input_device_id
*
id
;
if
(
!
handler
)
return
;
...
...
drivers/input/joydev.c
浏览文件 @
66e66118
...
...
@@ -451,7 +451,7 @@ static int joydev_ioctl(struct inode *inode, struct file *file, unsigned int cmd
}
}
static
struct
file_operations
joydev_fops
=
{
static
const
struct
file_operations
joydev_fops
=
{
.
owner
=
THIS_MODULE
,
.
read
=
joydev_read
,
.
write
=
joydev_write
,
...
...
@@ -465,7 +465,8 @@ static struct file_operations joydev_fops = {
.
fasync
=
joydev_fasync
,
};
static
struct
input_handle
*
joydev_connect
(
struct
input_handler
*
handler
,
struct
input_dev
*
dev
,
struct
input_device_id
*
id
)
static
struct
input_handle
*
joydev_connect
(
struct
input_handler
*
handler
,
struct
input_dev
*
dev
,
const
struct
input_device_id
*
id
)
{
struct
joydev
*
joydev
;
struct
class_device
*
cdev
;
...
...
@@ -562,7 +563,7 @@ static void joydev_disconnect(struct input_handle *handle)
joydev_free
(
joydev
);
}
static
struct
input_device_id
joydev_blacklist
[]
=
{
static
const
struct
input_device_id
joydev_blacklist
[]
=
{
{
.
flags
=
INPUT_DEVICE_ID_MATCH_EVBIT
|
INPUT_DEVICE_ID_MATCH_KEYBIT
,
.
evbit
=
{
BIT
(
EV_KEY
)
},
...
...
@@ -571,7 +572,7 @@ static struct input_device_id joydev_blacklist[] = {
{
}
/* Terminating entry */
};
static
struct
input_device_id
joydev_ids
[]
=
{
static
const
struct
input_device_id
joydev_ids
[]
=
{
{
.
flags
=
INPUT_DEVICE_ID_MATCH_EVBIT
|
INPUT_DEVICE_ID_MATCH_ABSBIT
,
.
evbit
=
{
BIT
(
EV_ABS
)
},
...
...
drivers/input/mousedev.c
浏览文件 @
66e66118
...
...
@@ -614,7 +614,7 @@ static unsigned int mousedev_poll(struct file *file, poll_table *wait)
(
list
->
mousedev
->
exist
?
0
:
(
POLLHUP
|
POLLERR
));
}
static
struct
file_operations
mousedev_fops
=
{
static
const
struct
file_operations
mousedev_fops
=
{
.
owner
=
THIS_MODULE
,
.
read
=
mousedev_read
,
.
write
=
mousedev_write
,
...
...
@@ -624,7 +624,8 @@ static struct file_operations mousedev_fops = {
.
fasync
=
mousedev_fasync
,
};
static
struct
input_handle
*
mousedev_connect
(
struct
input_handler
*
handler
,
struct
input_dev
*
dev
,
struct
input_device_id
*
id
)
static
struct
input_handle
*
mousedev_connect
(
struct
input_handler
*
handler
,
struct
input_dev
*
dev
,
const
struct
input_device_id
*
id
)
{
struct
mousedev
*
mousedev
;
struct
class_device
*
cdev
;
...
...
@@ -688,7 +689,7 @@ static void mousedev_disconnect(struct input_handle *handle)
}
}
static
struct
input_device_id
mousedev_ids
[]
=
{
static
const
struct
input_device_id
mousedev_ids
[]
=
{
{
.
flags
=
INPUT_DEVICE_ID_MATCH_EVBIT
|
INPUT_DEVICE_ID_MATCH_KEYBIT
|
INPUT_DEVICE_ID_MATCH_RELBIT
,
.
evbit
=
{
BIT
(
EV_KEY
)
|
BIT
(
EV_REL
)
},
...
...
drivers/input/power.c
浏览文件 @
66e66118
...
...
@@ -98,7 +98,7 @@ static void power_event(struct input_handle *handle, unsigned int type,
static
struct
input_handle
*
power_connect
(
struct
input_handler
*
handler
,
struct
input_dev
*
dev
,
struct
input_device_id
*
id
)
const
struct
input_device_id
*
id
)
{
struct
input_handle
*
handle
;
...
...
@@ -120,7 +120,7 @@ static void power_disconnect(struct input_handle *handle)
kfree
(
handle
);
}
static
struct
input_device_id
power_ids
[]
=
{
static
const
struct
input_device_id
power_ids
[]
=
{
{
.
flags
=
INPUT_DEVICE_ID_MATCH_EVBIT
|
INPUT_DEVICE_ID_MATCH_KEYBIT
,
.
evbit
=
{
BIT
(
EV_KEY
)
},
...
...
drivers/input/tsdev.c
浏览文件 @
66e66118
...
...
@@ -135,8 +135,6 @@ struct tsdev_list {
#define TS_GET_CAL _IOR(IOC_H3600_TS_MAGIC, 10, struct ts_calibration)
#define TS_SET_CAL _IOW(IOC_H3600_TS_MAGIC, 11, struct ts_calibration)
static
struct
input_handler
tsdev_handler
;
static
struct
tsdev
*
tsdev_table
[
TSDEV_MINORS
/
2
];
static
int
tsdev_fasync
(
int
fd
,
struct
file
*
file
,
int
on
)
...
...
@@ -263,7 +261,7 @@ static int tsdev_ioctl(struct inode *inode, struct file *file,
return
retval
;
}
static
struct
file_operations
tsdev_fops
=
{
static
const
struct
file_operations
tsdev_fops
=
{
.
owner
=
THIS_MODULE
,
.
open
=
tsdev_open
,
.
release
=
tsdev_release
,
...
...
@@ -370,7 +368,7 @@ static void tsdev_event(struct input_handle *handle, unsigned int type,
static
struct
input_handle
*
tsdev_connect
(
struct
input_handler
*
handler
,
struct
input_dev
*
dev
,
struct
input_device_id
*
id
)
const
struct
input_device_id
*
id
)
{
struct
tsdev
*
tsdev
;
struct
class_device
*
cdev
;
...
...
@@ -443,7 +441,7 @@ static void tsdev_disconnect(struct input_handle *handle)
tsdev_free
(
tsdev
);
}
static
struct
input_device_id
tsdev_ids
[]
=
{
static
const
struct
input_device_id
tsdev_ids
[]
=
{
{
.
flags
=
INPUT_DEVICE_ID_MATCH_EVBIT
|
INPUT_DEVICE_ID_MATCH_KEYBIT
|
INPUT_DEVICE_ID_MATCH_RELBIT
,
.
evbit
=
{
BIT
(
EV_KEY
)
|
BIT
(
EV_REL
)
},
...
...
include/linux/input.h
浏览文件 @
66e66118
...
...
@@ -1059,16 +1059,16 @@ struct input_handler {
void
*
private
;
void
(
*
event
)(
struct
input_handle
*
handle
,
unsigned
int
type
,
unsigned
int
code
,
int
value
);
struct
input_handle
*
(
*
connect
)(
struct
input_handler
*
handler
,
struct
input_dev
*
dev
,
struct
input_device_id
*
id
);
struct
input_handle
*
(
*
connect
)(
struct
input_handler
*
handler
,
struct
input_dev
*
dev
,
const
struct
input_device_id
*
id
);
void
(
*
disconnect
)(
struct
input_handle
*
handle
);
void
(
*
start
)(
struct
input_handle
*
handle
);
const
struct
file_operations
*
fops
;
int
minor
;
char
*
name
;
c
onst
c
har
*
name
;
struct
input_device_id
*
id_table
;
struct
input_device_id
*
blacklist
;
const
struct
input_device_id
*
id_table
;
const
struct
input_device_id
*
blacklist
;
struct
list_head
h_list
;
struct
list_head
node
;
...
...
@@ -1079,7 +1079,7 @@ struct input_handle {
void
*
private
;
int
open
;
char
*
name
;
c
onst
c
har
*
name
;
struct
input_dev
*
dev
;
struct
input_handler
*
handler
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录