Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
4548a9db
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看板
提交
4548a9db
编写于
8月 24, 2007
作者:
L
Len Brown
浏览文件
操作
浏览文件
下载
差异文件
Pull ec into release branch
上级
de9bde9a
f9319f90
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
31 addition
and
16 deletion
+31
-16
drivers/acpi/ec.c
drivers/acpi/ec.c
+31
-16
未找到文件。
drivers/acpi/ec.c
浏览文件 @
4548a9db
...
...
@@ -696,14 +696,6 @@ ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval)
return
AE_CTRL_TERMINATE
;
}
static
void
ec_remove_handlers
(
struct
acpi_ec
*
ec
)
{
acpi_remove_address_space_handler
(
ec
->
handle
,
ACPI_ADR_SPACE_EC
,
&
acpi_ec_space_handler
);
acpi_remove_gpe_handler
(
NULL
,
ec
->
gpe
,
&
acpi_ec_gpe_handler
);
}
static
int
acpi_ec_add
(
struct
acpi_device
*
device
)
{
struct
acpi_ec
*
ec
=
NULL
;
...
...
@@ -727,13 +719,16 @@ static int acpi_ec_add(struct acpi_device *device)
/* Check if we found the boot EC */
if
(
boot_ec
)
{
if
(
boot_ec
->
gpe
==
ec
->
gpe
)
{
ec_remove_handlers
(
boot_ec
);
mutex_destroy
(
&
boot_ec
->
lock
);
kfree
(
boot_ec
);
first_ec
=
boot_ec
=
NULL
;
/* We might have incorrect info for GL at boot time */
mutex_lock
(
&
boot_ec
->
lock
);
boot_ec
->
global_lock
=
ec
->
global_lock
;
/* Copy handlers from new ec into boot ec */
list_splice
(
&
ec
->
list
,
&
boot_ec
->
list
);
mutex_unlock
(
&
boot_ec
->
lock
);
kfree
(
ec
);
ec
=
boot_ec
;
}
}
if
(
!
first_ec
)
}
else
first_ec
=
ec
;
ec
->
handle
=
device
->
handle
;
acpi_driver_data
(
device
)
=
ec
;
...
...
@@ -762,6 +757,9 @@ static int acpi_ec_remove(struct acpi_device *device, int type)
if
(
ec
==
first_ec
)
first_ec
=
NULL
;
/* Don't touch boot EC */
if
(
boot_ec
!=
ec
)
kfree
(
ec
);
return
0
;
}
...
...
@@ -825,7 +823,9 @@ static int acpi_ec_start(struct acpi_device *device)
if
(
!
ec
)
return
-
EINVAL
;
ret
=
ec_install_handlers
(
ec
);
/* Boot EC is already working */
if
(
ec
!=
boot_ec
)
ret
=
ec_install_handlers
(
ec
);
/* EC is fully operational, allow queries */
atomic_set
(
&
ec
->
query_pending
,
0
);
...
...
@@ -835,6 +835,7 @@ static int acpi_ec_start(struct acpi_device *device)
static
int
acpi_ec_stop
(
struct
acpi_device
*
device
,
int
type
)
{
acpi_status
status
;
struct
acpi_ec
*
ec
;
if
(
!
device
)
...
...
@@ -843,7 +844,21 @@ static int acpi_ec_stop(struct acpi_device *device, int type)
ec
=
acpi_driver_data
(
device
);
if
(
!
ec
)
return
-
EINVAL
;
ec_remove_handlers
(
ec
);
/* Don't touch boot EC */
if
(
ec
==
boot_ec
)
return
0
;
status
=
acpi_remove_address_space_handler
(
ec
->
handle
,
ACPI_ADR_SPACE_EC
,
&
acpi_ec_space_handler
);
if
(
ACPI_FAILURE
(
status
))
return
-
ENODEV
;
status
=
acpi_remove_gpe_handler
(
NULL
,
ec
->
gpe
,
&
acpi_ec_gpe_handler
);
if
(
ACPI_FAILURE
(
status
))
return
-
ENODEV
;
return
0
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录