Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
e2d39e0f
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
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看板
提交
e2d39e0f
编写于
4月 05, 2018
作者:
J
Jiri Kosina
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'for-4.17/upstream' into for-linus
Pull a few small generic code cleanups.
上级
108ff0e8
2ddc8e2d
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
54 addition
and
63 deletion
+54
-63
Documentation/admin-guide/kernel-parameters.txt
Documentation/admin-guide/kernel-parameters.txt
+3
-0
drivers/hid/hid-asus.c
drivers/hid/hid-asus.c
+3
-1
drivers/hid/hid-core.c
drivers/hid/hid-core.c
+24
-11
drivers/hid/hid-generic.c
drivers/hid/hid-generic.c
+0
-33
drivers/hid/hid-multitouch.c
drivers/hid/hid-multitouch.c
+1
-1
drivers/hid/hid-ntrig.c
drivers/hid/hid-ntrig.c
+6
-6
drivers/hid/uhid.c
drivers/hid/uhid.c
+6
-6
drivers/hid/usbhid/hid-core.c
drivers/hid/usbhid/hid-core.c
+11
-1
include/linux/hid.h
include/linux/hid.h
+0
-4
未找到文件。
Documentation/admin-guide/kernel-parameters.txt
浏览文件 @
e2d39e0f
...
...
@@ -4352,6 +4352,9 @@
usbhid.jspoll=
[USBHID] The interval which joysticks are to be polled at.
usbhid.kbpoll=
[USBHID] The interval which keyboards are to be polled at.
usb-storage.delay_use=
[UMS] The delay in seconds before a new device is
scanned for Logical Units (default 1).
...
...
drivers/hid/hid-asus.c
浏览文件 @
e2d39e0f
...
...
@@ -570,7 +570,9 @@ static int asus_input_mapping(struct hid_device *hdev,
static
int
asus_start_multitouch
(
struct
hid_device
*
hdev
)
{
int
ret
;
const
unsigned
char
buf
[]
=
{
FEATURE_REPORT_ID
,
0x00
,
0x03
,
0x01
,
0x00
};
static
const
unsigned
char
buf
[]
=
{
FEATURE_REPORT_ID
,
0x00
,
0x03
,
0x01
,
0x00
};
unsigned
char
*
dmabuf
=
kmemdup
(
buf
,
sizeof
(
buf
),
GFP_KERNEL
);
if
(
!
dmabuf
)
{
...
...
drivers/hid/hid-core.c
浏览文件 @
e2d39e0f
...
...
@@ -2199,31 +2199,40 @@ void hid_destroy_device(struct hid_device *hdev)
EXPORT_SYMBOL_GPL
(
hid_destroy_device
);
static
int
__
bus_add_driver
(
struct
device_driver
*
dr
v
,
void
*
data
)
static
int
__
hid_bus_reprobe_drivers
(
struct
device
*
de
v
,
void
*
data
)
{
struct
hid_driver
*
added_
hdrv
=
data
;
struct
hid_d
river
*
hdrv
=
to_hid_driver
(
dr
v
);
struct
hid_driver
*
hdrv
=
data
;
struct
hid_d
evice
*
hdev
=
to_hid_device
(
de
v
);
if
(
hdrv
->
bus_add_driver
)
hdrv
->
bus_add_driver
(
added_hdrv
);
if
(
hdev
->
driver
==
hdrv
&&
!
hdrv
->
match
(
hdev
,
hid_ignore_special_drivers
))
return
device_reprobe
(
dev
);
return
0
;
}
static
int
__
bus_removed_driver
(
struct
device_driver
*
drv
,
void
*
data
)
static
int
__
hid_bus_driver_added
(
struct
device_driver
*
drv
,
void
*
data
)
{
struct
hid_driver
*
removed_hdrv
=
data
;
struct
hid_driver
*
hdrv
=
to_hid_driver
(
drv
);
if
(
hdrv
->
bus_removed_driver
)
hdrv
->
bus_removed_driver
(
removed_hdrv
);
if
(
hdrv
->
match
)
{
bus_for_each_dev
(
&
hid_bus_type
,
NULL
,
hdrv
,
__hid_bus_reprobe_drivers
);
}
return
0
;
}
static
int
__bus_removed_driver
(
struct
device_driver
*
drv
,
void
*
data
)
{
return
bus_rescan_devices
(
&
hid_bus_type
);
}
int
__hid_register_driver
(
struct
hid_driver
*
hdrv
,
struct
module
*
owner
,
const
char
*
mod_name
)
{
int
ret
;
hdrv
->
driver
.
name
=
hdrv
->
name
;
hdrv
->
driver
.
bus
=
&
hid_bus_type
;
hdrv
->
driver
.
owner
=
owner
;
...
...
@@ -2232,9 +2241,13 @@ int __hid_register_driver(struct hid_driver *hdrv, struct module *owner,
INIT_LIST_HEAD
(
&
hdrv
->
dyn_list
);
spin_lock_init
(
&
hdrv
->
dyn_lock
);
bus_for_each_drv
(
&
hid_bus_type
,
NULL
,
hdrv
,
__bus_add_driver
);
ret
=
driver_register
(
&
hdrv
->
driver
);
if
(
ret
==
0
)
bus_for_each_drv
(
&
hid_bus_type
,
NULL
,
NULL
,
__hid_bus_driver_added
);
return
driver_register
(
&
hdrv
->
driver
)
;
return
ret
;
}
EXPORT_SYMBOL_GPL
(
__hid_register_driver
);
...
...
drivers/hid/hid-generic.c
浏览文件 @
e2d39e0f
...
...
@@ -26,37 +26,6 @@
static
struct
hid_driver
hid_generic
;
static
int
__unmap_hid_generic
(
struct
device
*
dev
,
void
*
data
)
{
struct
hid_driver
*
hdrv
=
data
;
struct
hid_device
*
hdev
=
to_hid_device
(
dev
);
/* only unbind matching devices already bound to hid-generic */
if
(
hdev
->
driver
!=
&
hid_generic
||
hid_match_device
(
hdev
,
hdrv
)
==
NULL
)
return
0
;
if
(
dev
->
parent
)
/* Needed for USB */
device_lock
(
dev
->
parent
);
device_release_driver
(
dev
);
if
(
dev
->
parent
)
device_unlock
(
dev
->
parent
);
return
0
;
}
static
void
hid_generic_add_driver
(
struct
hid_driver
*
hdrv
)
{
bus_for_each_dev
(
&
hid_bus_type
,
NULL
,
hdrv
,
__unmap_hid_generic
);
}
static
void
hid_generic_removed_driver
(
struct
hid_driver
*
hdrv
)
{
int
ret
;
ret
=
driver_attach
(
&
hid_generic
.
driver
);
}
static
int
__check_hid_generic
(
struct
device_driver
*
drv
,
void
*
data
)
{
struct
hid_driver
*
hdrv
=
to_hid_driver
(
drv
);
...
...
@@ -97,8 +66,6 @@ static struct hid_driver hid_generic = {
.
name
=
"hid-generic"
,
.
id_table
=
hid_table
,
.
match
=
hid_generic_match
,
.
bus_add_driver
=
hid_generic_add_driver
,
.
bus_removed_driver
=
hid_generic_removed_driver
,
};
module_hid_driver
(
hid_generic
);
...
...
drivers/hid/hid-multitouch.c
浏览文件 @
e2d39e0f
...
...
@@ -731,7 +731,7 @@ static void mt_complete_slot(struct mt_device *td, struct input_dev *input)
}
if
(
!
(
td
->
mtclass
.
quirks
&
MT_QUIRK_CONFIDENCE
))
s
->
confidence_state
=
1
;
s
->
confidence_state
=
true
;
active
=
(
s
->
touch_state
||
s
->
inrange_state
)
&&
s
->
confidence_state
;
...
...
drivers/hid/hid-ntrig.c
浏览文件 @
e2d39e0f
...
...
@@ -591,8 +591,8 @@ static int ntrig_event (struct hid_device *hid, struct hid_field *field,
switch
(
usage
->
hid
)
{
case
0xff000001
:
/* Tag indicating the start of a multitouch group */
nd
->
reading_mt
=
1
;
nd
->
first_contact_touch
=
0
;
nd
->
reading_mt
=
true
;
nd
->
first_contact_touch
=
false
;
break
;
case
HID_DG_TIPSWITCH
:
nd
->
tipswitch
=
value
;
...
...
@@ -663,7 +663,7 @@ static int ntrig_event (struct hid_device *hid, struct hid_field *field,
* even if deactivation slack is turned off.
*/
nd
->
act_state
=
deactivate_slack
-
1
;
nd
->
confidence
=
0
;
nd
->
confidence
=
false
;
break
;
}
...
...
@@ -679,7 +679,7 @@ static int ntrig_event (struct hid_device *hid, struct hid_field *field,
*/
if
(
nd
->
w
<
nd
->
min_width
||
nd
->
h
<
nd
->
min_height
)
nd
->
confidence
=
0
;
nd
->
confidence
=
false
;
}
else
break
;
...
...
@@ -758,7 +758,7 @@ static int ntrig_event (struct hid_device *hid, struct hid_field *field,
if
(
!
nd
->
reading_mt
)
/* Just to be sure */
break
;
nd
->
reading_mt
=
0
;
nd
->
reading_mt
=
false
;
/*
...
...
@@ -910,7 +910,7 @@ static int ntrig_probe(struct hid_device *hdev, const struct hid_device_id *id)
return
-
ENOMEM
;
}
nd
->
reading_mt
=
0
;
nd
->
reading_mt
=
false
;
nd
->
min_width
=
0
;
nd
->
min_height
=
0
;
nd
->
activate_slack
=
activate_slack
;
...
...
drivers/hid/uhid.c
浏览文件 @
e2d39e0f
...
...
@@ -496,12 +496,12 @@ static int uhid_dev_create2(struct uhid_device *uhid,
goto
err_free
;
}
len
=
min
(
sizeof
(
hid
->
name
),
sizeof
(
ev
->
u
.
create2
.
name
))
-
1
;
str
n
cpy
(
hid
->
name
,
ev
->
u
.
create2
.
name
,
len
);
len
=
min
(
sizeof
(
hid
->
phys
),
sizeof
(
ev
->
u
.
create2
.
phys
))
-
1
;
str
n
cpy
(
hid
->
phys
,
ev
->
u
.
create2
.
phys
,
len
);
len
=
min
(
sizeof
(
hid
->
uniq
),
sizeof
(
ev
->
u
.
create2
.
uniq
))
-
1
;
str
n
cpy
(
hid
->
uniq
,
ev
->
u
.
create2
.
uniq
,
len
);
len
=
min
(
sizeof
(
hid
->
name
),
sizeof
(
ev
->
u
.
create2
.
name
));
str
l
cpy
(
hid
->
name
,
ev
->
u
.
create2
.
name
,
len
);
len
=
min
(
sizeof
(
hid
->
phys
),
sizeof
(
ev
->
u
.
create2
.
phys
));
str
l
cpy
(
hid
->
phys
,
ev
->
u
.
create2
.
phys
,
len
);
len
=
min
(
sizeof
(
hid
->
uniq
),
sizeof
(
ev
->
u
.
create2
.
uniq
));
str
l
cpy
(
hid
->
uniq
,
ev
->
u
.
create2
.
uniq
,
len
);
hid
->
ll_driver
=
&
uhid_hid_driver
;
hid
->
bus
=
ev
->
u
.
create2
.
bus
;
...
...
drivers/hid/usbhid/hid-core.c
浏览文件 @
e2d39e0f
...
...
@@ -56,6 +56,10 @@ static unsigned int hid_jspoll_interval;
module_param_named
(
jspoll
,
hid_jspoll_interval
,
uint
,
0644
);
MODULE_PARM_DESC
(
jspoll
,
"Polling interval of joysticks"
);
static
unsigned
int
hid_kbpoll_interval
;
module_param_named
(
kbpoll
,
hid_kbpoll_interval
,
uint
,
0644
);
MODULE_PARM_DESC
(
kbpoll
,
"Polling interval of keyboards"
);
static
unsigned
int
ignoreled
;
module_param_named
(
ignoreled
,
ignoreled
,
uint
,
0644
);
MODULE_PARM_DESC
(
ignoreled
,
"Autosuspend with active leds"
);
...
...
@@ -1094,7 +1098,9 @@ static int usbhid_start(struct hid_device *hid)
hid
->
name
,
endpoint
->
bInterval
,
interval
);
}
/* Change the polling interval of mice and joysticks. */
/* Change the polling interval of mice, joysticks
* and keyboards.
*/
switch
(
hid
->
collection
->
usage
)
{
case
HID_GD_MOUSE
:
if
(
hid_mousepoll_interval
>
0
)
...
...
@@ -1104,6 +1110,10 @@ static int usbhid_start(struct hid_device *hid)
if
(
hid_jspoll_interval
>
0
)
interval
=
hid_jspoll_interval
;
break
;
case
HID_GD_KEYBOARD
:
if
(
hid_kbpoll_interval
>
0
)
interval
=
hid_kbpoll_interval
;
break
;
}
ret
=
-
ENOMEM
;
...
...
include/linux/hid.h
浏览文件 @
e2d39e0f
...
...
@@ -687,8 +687,6 @@ struct hid_usage_id {
* @input_mapped: invoked on input registering after mapping an usage
* @input_configured: invoked just before the device is registered
* @feature_mapping: invoked on feature registering
* @bus_add_driver: invoked when a HID driver is about to be added
* @bus_removed_driver: invoked when a HID driver has been removed
* @suspend: invoked on suspend (NULL means nop)
* @resume: invoked on resume if device was not reset (NULL means nop)
* @reset_resume: invoked on resume if device was reset (NULL means nop)
...
...
@@ -743,8 +741,6 @@ struct hid_driver {
void
(
*
feature_mapping
)(
struct
hid_device
*
hdev
,
struct
hid_field
*
field
,
struct
hid_usage
*
usage
);
void
(
*
bus_add_driver
)(
struct
hid_driver
*
driver
);
void
(
*
bus_removed_driver
)(
struct
hid_driver
*
driver
);
#ifdef CONFIG_PM
int
(
*
suspend
)(
struct
hid_device
*
hdev
,
pm_message_t
message
);
int
(
*
resume
)(
struct
hid_device
*
hdev
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录