Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
b43035a5
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看板
提交
b43035a5
编写于
7月 22, 2007
作者:
L
Len Brown
浏览文件
操作
浏览文件
下载
差异文件
Pull sbs into release branch
上级
8269cc4e
addad454
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
7 addition
and
26 deletion
+7
-26
drivers/acpi/sbs.c
drivers/acpi/sbs.c
+7
-26
未找到文件。
drivers/acpi/sbs.c
浏览文件 @
b43035a5
...
...
@@ -127,7 +127,7 @@ static int acpi_sbs_resume(struct acpi_device *device);
static
struct
acpi_driver
acpi_sbs_driver
=
{
.
name
=
"sbs"
,
.
class
=
ACPI_SBS_CLASS
,
.
ids
=
ACPI_SBS_HID
,
.
ids
=
"ACPI0001,ACPI0005"
,
.
ops
=
{
.
add
=
acpi_sbs_add
,
.
remove
=
acpi_sbs_remove
,
...
...
@@ -176,10 +176,8 @@ struct acpi_battery {
};
struct
acpi_sbs
{
acpi_handle
handle
;
int
base
;
struct
acpi_device
*
device
;
struct
acpi_ec_smbus
*
smbus
;
struct
mutex
mutex
;
int
sbsm_present
;
int
sbsm_batteries_supported
;
...
...
@@ -511,7 +509,7 @@ static int acpi_sbsm_get_info(struct acpi_sbs *sbs)
"acpi_sbs_read_word() failed"
));
goto
end
;
}
sbs
->
sbsm_present
=
1
;
sbs
->
sbsm_batteries_supported
=
battery_system_info
&
0x000f
;
end:
...
...
@@ -1630,13 +1628,12 @@ static int acpi_sbs_add(struct acpi_device *device)
{
struct
acpi_sbs
*
sbs
=
NULL
;
int
result
=
0
,
remove_result
=
0
;
unsigned
long
sbs_obj
;
int
id
;
acpi_status
status
=
AE_OK
;
unsigned
long
val
;
status
=
acpi_evaluate_integer
(
device
->
parent
->
handle
,
"_EC"
,
NULL
,
&
val
);
acpi_evaluate_integer
(
device
->
handle
,
"_EC"
,
NULL
,
&
val
);
if
(
ACPI_FAILURE
(
status
))
{
ACPI_EXCEPTION
((
AE_INFO
,
AE_ERROR
,
"Error obtaining _EC"
));
return
-
EIO
;
...
...
@@ -1653,7 +1650,7 @@ static int acpi_sbs_add(struct acpi_device *device)
sbs_mutex_lock
(
sbs
);
sbs
->
base
=
(
val
&
0xff00ull
)
>>
8
;
sbs
->
base
=
0xff
&
(
val
>>
8
)
;
sbs
->
device
=
device
;
strcpy
(
acpi_device_name
(
device
),
ACPI_SBS_DEVICE_NAME
);
...
...
@@ -1665,24 +1662,10 @@ static int acpi_sbs_add(struct acpi_device *device)
ACPI_EXCEPTION
((
AE_INFO
,
AE_ERROR
,
"acpi_ac_add() failed"
));
goto
end
;
}
status
=
acpi_evaluate_integer
(
device
->
handle
,
"_SBS"
,
NULL
,
&
sbs_obj
);
if
(
status
)
{
ACPI_EXCEPTION
((
AE_INFO
,
status
,
"acpi_evaluate_integer() failed"
));
result
=
-
EIO
;
goto
end
;
}
if
(
sbs_obj
>
0
)
{
result
=
acpi_sbsm_get_info
(
sbs
);
if
(
result
)
{
ACPI_EXCEPTION
((
AE_INFO
,
AE_ERROR
,
"acpi_sbsm_get_info() failed"
));
goto
end
;
}
sbs
->
sbsm_present
=
1
;
}
if
(
sbs
->
sbsm_present
==
0
)
{
acpi_sbsm_get_info
(
sbs
);
if
(
!
sbs
->
sbsm_present
)
{
result
=
acpi_battery_add
(
sbs
,
0
);
if
(
result
)
{
ACPI_EXCEPTION
((
AE_INFO
,
AE_ERROR
,
...
...
@@ -1702,8 +1685,6 @@ static int acpi_sbs_add(struct acpi_device *device)
}
}
sbs
->
handle
=
device
->
handle
;
init_timer
(
&
sbs
->
update_timer
);
result
=
acpi_check_update_proc
(
sbs
);
if
(
result
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录