Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
3390e579
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看板
提交
3390e579
编写于
5月 17, 2016
作者:
J
Jiri Kosina
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'for-4.7/upstream' into for-linus
Conflicts: drivers/hid/usbhid/hid-quirks.c
上级
27fd38c5
282bf1fe
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
31 addition
and
24 deletion
+31
-24
drivers/hid/hid-core.c
drivers/hid/hid-core.c
+15
-18
drivers/hid/hid-ids.h
drivers/hid/hid-ids.h
+7
-0
drivers/hid/hid-roccat.c
drivers/hid/hid-roccat.c
+2
-3
drivers/hid/hidraw.c
drivers/hid/hidraw.c
+2
-3
drivers/hid/usbhid/hid-quirks.c
drivers/hid/usbhid/hid-quirks.c
+5
-0
未找到文件。
drivers/hid/hid-core.c
浏览文件 @
3390e579
...
...
@@ -1129,49 +1129,46 @@ EXPORT_SYMBOL_GPL(hid_field_extract);
static
void
__implement
(
u8
*
report
,
unsigned
offset
,
int
n
,
u32
value
)
{
unsigned
int
idx
=
offset
/
8
;
unsigned
int
size
=
offset
+
n
;
unsigned
int
bit_shift
=
offset
%
8
;
int
bits_to_set
=
8
-
bit_shift
;
u8
bit_mask
=
0xff
<<
bit_shift
;
while
(
n
-
bits_to_set
>=
0
)
{
report
[
idx
]
&=
~
bit_mask
;
report
[
idx
]
&=
~
(
0xff
<<
bit_shift
)
;
report
[
idx
]
|=
value
<<
bit_shift
;
value
>>=
bits_to_set
;
n
-=
bits_to_set
;
bits_to_set
=
8
;
bit_mask
=
0xff
;
bit_shift
=
0
;
idx
++
;
}
/* last nibble */
if
(
n
)
{
if
(
size
%
8
)
bit_mask
&=
(
1U
<<
(
size
%
8
))
-
1
;
report
[
idx
]
&=
~
bit_mask
;
report
[
idx
]
|=
(
value
<<
bit_shift
)
&
bit_mask
;
u8
bit_mask
=
((
1U
<<
n
)
-
1
);
report
[
idx
]
&=
~
(
bit_mask
<<
bit_shift
);
report
[
idx
]
|=
value
<<
bit_shift
;
}
}
static
void
implement
(
const
struct
hid_device
*
hid
,
u8
*
report
,
unsigned
offset
,
unsigned
n
,
u32
value
)
{
u64
m
;
if
(
n
>
32
)
{
if
(
unlikely
(
n
>
32
))
{
hid_warn
(
hid
,
"%s() called with n (%d) > 32! (%s)
\n
"
,
__func__
,
n
,
current
->
comm
);
n
=
32
;
}
else
if
(
n
<
32
)
{
u32
m
=
(
1U
<<
n
)
-
1
;
if
(
unlikely
(
value
>
m
))
{
hid_warn
(
hid
,
"%s() called with too large value %d (n: %d)! (%s)
\n
"
,
__func__
,
value
,
n
,
current
->
comm
);
WARN_ON
(
1
);
value
&=
m
;
}
}
m
=
(
1ULL
<<
n
)
-
1
;
if
(
value
>
m
)
hid_warn
(
hid
,
"%s() called with too large value %d! (%s)
\n
"
,
__func__
,
value
,
current
->
comm
);
WARN_ON
(
value
>
m
);
value
&=
m
;
__implement
(
report
,
offset
,
n
,
value
);
}
...
...
drivers/hid/hid-ids.h
浏览文件 @
3390e579
...
...
@@ -259,6 +259,13 @@
#define USB_VENDOR_ID_CORSAIR 0x1b1c
#define USB_DEVICE_ID_CORSAIR_K90 0x1b02
#define USB_VENDOR_ID_CORSAIR 0x1b1c
#define USB_DEVICE_ID_CORSAIR_K70R 0x1b09
#define USB_DEVICE_ID_CORSAIR_K95RGB 0x1b11
#define USB_DEVICE_ID_CORSAIR_M65RGB 0x1b12
#define USB_DEVICE_ID_CORSAIR_K70RGB 0x1b13
#define USB_DEVICE_ID_CORSAIR_K65RGB 0x1b17
#define USB_VENDOR_ID_CREATIVELABS 0x041e
#define USB_DEVICE_ID_CREATIVE_SB_OMNI_SURROUND_51 0x322c
#define USB_DEVICE_ID_PRODIKEYS_PCMIDI 0x2801
...
...
drivers/hid/hid-roccat.c
浏览文件 @
3390e579
...
...
@@ -421,14 +421,13 @@ static int __init roccat_init(void)
retval
=
alloc_chrdev_region
(
&
dev_id
,
ROCCAT_FIRST_MINOR
,
ROCCAT_MAX_DEVICES
,
"roccat"
);
roccat_major
=
MAJOR
(
dev_id
);
if
(
retval
<
0
)
{
pr_warn
(
"can't get major number
\n
"
);
goto
error
;
}
roccat_major
=
MAJOR
(
dev_id
);
cdev_init
(
&
roccat_cdev
,
&
roccat_ops
);
retval
=
cdev_add
(
&
roccat_cdev
,
dev_id
,
ROCCAT_MAX_DEVICES
);
...
...
drivers/hid/hidraw.c
浏览文件 @
3390e579
...
...
@@ -582,14 +582,13 @@ int __init hidraw_init(void)
result
=
alloc_chrdev_region
(
&
dev_id
,
HIDRAW_FIRST_MINOR
,
HIDRAW_MAX_DEVICES
,
"hidraw"
);
hidraw_major
=
MAJOR
(
dev_id
);
if
(
result
<
0
)
{
pr_warn
(
"can't get major number
\n
"
);
goto
out
;
}
hidraw_major
=
MAJOR
(
dev_id
);
hidraw_class
=
class_create
(
THIS_MODULE
,
"hidraw"
);
if
(
IS_ERR
(
hidraw_class
))
{
result
=
PTR_ERR
(
hidraw_class
);
...
...
drivers/hid/usbhid/hid-quirks.c
浏览文件 @
3390e579
...
...
@@ -71,6 +71,11 @@ static const struct hid_blacklist {
{
USB_VENDOR_ID_CH
,
USB_DEVICE_ID_CH_3AXIS_5BUTTON_STICK
,
HID_QUIRK_NOGET
},
{
USB_VENDOR_ID_CH
,
USB_DEVICE_ID_CH_AXIS_295
,
HID_QUIRK_NOGET
},
{
USB_VENDOR_ID_CHICONY
,
USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE
,
HID_QUIRK_ALWAYS_POLL
},
{
USB_VENDOR_ID_CORSAIR
,
USB_DEVICE_ID_CORSAIR_K70R
,
HID_QUIRK_NO_INIT_REPORTS
},
{
USB_VENDOR_ID_CORSAIR
,
USB_DEVICE_ID_CORSAIR_M65RGB
,
HID_QUIRK_NO_INIT_REPORTS
},
{
USB_VENDOR_ID_CORSAIR
,
USB_DEVICE_ID_CORSAIR_K95RGB
,
HID_QUIRK_NO_INIT_REPORTS
|
HID_QUIRK_ALWAYS_POLL
},
{
USB_VENDOR_ID_CORSAIR
,
USB_DEVICE_ID_CORSAIR_K70RGB
,
HID_QUIRK_NO_INIT_REPORTS
},
{
USB_VENDOR_ID_CORSAIR
,
USB_DEVICE_ID_CORSAIR_K65RGB
,
HID_QUIRK_NO_INIT_REPORTS
},
{
USB_VENDOR_ID_CREATIVELABS
,
USB_DEVICE_ID_CREATIVE_SB_OMNI_SURROUND_51
,
HID_QUIRK_NOGET
},
{
USB_VENDOR_ID_DMI
,
USB_DEVICE_ID_DMI_ENC
,
HID_QUIRK_NOGET
},
{
USB_VENDOR_ID_DRAGONRISE
,
USB_DEVICE_ID_DRAGONRISE_WIIU
,
HID_QUIRK_MULTI_INPUT
},
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录