Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
1ae22af7
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看板
提交
1ae22af7
编写于
12月 30, 2009
作者:
L
Len Brown
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'wmi' into release
上级
27d0567a
d1f9e497
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
58 addition
and
14 deletion
+58
-14
drivers/platform/x86/dell-wmi.c
drivers/platform/x86/dell-wmi.c
+12
-6
drivers/platform/x86/hp-wmi.c
drivers/platform/x86/hp-wmi.c
+7
-2
drivers/platform/x86/msi-wmi.c
drivers/platform/x86/msi-wmi.c
+7
-2
drivers/platform/x86/wmi.c
drivers/platform/x86/wmi.c
+32
-4
未找到文件。
drivers/platform/x86/dell-wmi.c
浏览文件 @
1ae22af7
...
...
@@ -202,8 +202,13 @@ static void dell_wmi_notify(u32 value, void *context)
struct
acpi_buffer
response
=
{
ACPI_ALLOCATE_BUFFER
,
NULL
};
static
struct
key_entry
*
key
;
union
acpi_object
*
obj
;
acpi_status
status
;
wmi_get_event_data
(
value
,
&
response
);
status
=
wmi_get_event_data
(
value
,
&
response
);
if
(
status
!=
AE_OK
)
{
printk
(
KERN_INFO
"dell-wmi: bad event status 0x%x
\n
"
,
status
);
return
;
}
obj
=
(
union
acpi_object
*
)
response
.
pointer
;
...
...
@@ -323,8 +328,9 @@ static int __init dell_wmi_input_setup(void)
static
int
__init
dell_wmi_init
(
void
)
{
int
err
;
acpi_status
status
;
if
(
wmi_has_guid
(
DELL_EVENT_GUID
))
{
if
(
!
wmi_has_guid
(
DELL_EVENT_GUID
))
{
printk
(
KERN_WARNING
"dell-wmi: No known WMI GUID found
\n
"
);
return
-
ENODEV
;
}
...
...
@@ -336,14 +342,14 @@ static int __init dell_wmi_init(void)
if
(
err
)
return
err
;
err
=
wmi_install_notify_handler
(
DELL_EVENT_GUID
,
status
=
wmi_install_notify_handler
(
DELL_EVENT_GUID
,
dell_wmi_notify
,
NULL
);
if
(
err
)
{
if
(
ACPI_FAILURE
(
status
)
)
{
input_unregister_device
(
dell_wmi_input_dev
);
printk
(
KERN_ERR
"dell-wmi: Unable to register notify handler - %d
\n
"
,
err
);
return
err
;
status
);
return
-
ENODEV
;
}
return
0
;
...
...
drivers/platform/x86/hp-wmi.c
浏览文件 @
1ae22af7
...
...
@@ -338,8 +338,13 @@ static void hp_wmi_notify(u32 value, void *context)
static
struct
key_entry
*
key
;
union
acpi_object
*
obj
;
int
eventcode
;
acpi_status
status
;
wmi_get_event_data
(
value
,
&
response
);
status
=
wmi_get_event_data
(
value
,
&
response
);
if
(
status
!=
AE_OK
)
{
printk
(
KERN_INFO
"hp-wmi: bad event status 0x%x
\n
"
,
status
);
return
;
}
obj
=
(
union
acpi_object
*
)
response
.
pointer
;
...
...
@@ -581,7 +586,7 @@ static int __init hp_wmi_init(void)
if
(
wmi_has_guid
(
HPWMI_EVENT_GUID
))
{
err
=
wmi_install_notify_handler
(
HPWMI_EVENT_GUID
,
hp_wmi_notify
,
NULL
);
if
(
!
err
)
if
(
ACPI_SUCCESS
(
err
)
)
hp_wmi_input_setup
();
}
...
...
drivers/platform/x86/msi-wmi.c
浏览文件 @
1ae22af7
...
...
@@ -149,8 +149,13 @@ static void msi_wmi_notify(u32 value, void *context)
static
struct
key_entry
*
key
;
union
acpi_object
*
obj
;
ktime_t
cur
;
acpi_status
status
;
wmi_get_event_data
(
value
,
&
response
);
status
=
wmi_get_event_data
(
value
,
&
response
);
if
(
status
!=
AE_OK
)
{
printk
(
KERN_INFO
DRV_PFX
"bad event status 0x%x
\n
"
,
status
);
return
;
}
obj
=
(
union
acpi_object
*
)
response
.
pointer
;
...
...
@@ -236,7 +241,7 @@ static int __init msi_wmi_init(void)
}
err
=
wmi_install_notify_handler
(
MSIWMI_EVENT_GUID
,
msi_wmi_notify
,
NULL
);
if
(
err
)
if
(
ACPI_FAILURE
(
err
)
)
return
-
EINVAL
;
err
=
msi_wmi_input_setup
();
...
...
drivers/platform/x86/wmi.c
浏览文件 @
1ae22af7
...
...
@@ -492,8 +492,7 @@ wmi_notify_handler handler, void *data)
if
(
!
guid
||
!
handler
)
return
AE_BAD_PARAMETER
;
find_guid
(
guid
,
&
block
);
if
(
!
block
)
if
(
!
find_guid
(
guid
,
&
block
))
return
AE_NOT_EXIST
;
if
(
block
->
handler
)
...
...
@@ -521,8 +520,7 @@ acpi_status wmi_remove_notify_handler(const char *guid)
if
(
!
guid
)
return
AE_BAD_PARAMETER
;
find_guid
(
guid
,
&
block
);
if
(
!
block
)
if
(
!
find_guid
(
guid
,
&
block
))
return
AE_NOT_EXIST
;
if
(
!
block
->
handler
)
...
...
@@ -716,6 +714,22 @@ static int wmi_class_init(void)
return
ret
;
}
static
bool
guid_already_parsed
(
const
char
*
guid_string
)
{
struct
guid_block
*
gblock
;
struct
wmi_block
*
wblock
;
struct
list_head
*
p
;
list_for_each
(
p
,
&
wmi_blocks
.
list
)
{
wblock
=
list_entry
(
p
,
struct
wmi_block
,
list
);
gblock
=
&
wblock
->
gblock
;
if
(
strncmp
(
gblock
->
guid
,
guid_string
,
16
)
==
0
)
return
true
;
}
return
false
;
}
/*
* Parse the _WDG method for the GUID data blocks
*/
...
...
@@ -725,6 +739,7 @@ static __init acpi_status parse_wdg(acpi_handle handle)
union
acpi_object
*
obj
;
struct
guid_block
*
gblock
;
struct
wmi_block
*
wblock
;
char
guid_string
[
37
];
acpi_status
status
;
u32
i
,
total
;
...
...
@@ -747,6 +762,19 @@ static __init acpi_status parse_wdg(acpi_handle handle)
memcpy
(
gblock
,
obj
->
buffer
.
pointer
,
obj
->
buffer
.
length
);
for
(
i
=
0
;
i
<
total
;
i
++
)
{
/*
Some WMI devices, like those for nVidia hooks, have a
duplicate GUID. It's not clear what we should do in this
case yet, so for now, we'll just ignore the duplicate.
Anyone who wants to add support for that device can come
up with a better workaround for the mess then.
*/
if
(
guid_already_parsed
(
gblock
[
i
].
guid
)
==
true
)
{
wmi_gtoa
(
gblock
[
i
].
guid
,
guid_string
);
printk
(
KERN_INFO
PREFIX
"Skipping duplicate GUID %s
\n
"
,
guid_string
);
continue
;
}
wblock
=
kzalloc
(
sizeof
(
struct
wmi_block
),
GFP_KERNEL
);
if
(
!
wblock
)
return
AE_NO_MEMORY
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录