Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
6f5464ce
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看板
提交
6f5464ce
编写于
12月 24, 2009
作者:
L
Len Brown
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'osc' into release
上级
2f99f5c8
9dc130fc
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
18 addition
and
8 deletion
+18
-8
drivers/acpi/bus.c
drivers/acpi/bus.c
+18
-8
未找到文件。
drivers/acpi/bus.c
浏览文件 @
6f5464ce
...
@@ -397,6 +397,7 @@ acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context)
...
@@ -397,6 +397,7 @@ acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context)
union
acpi_object
*
out_obj
;
union
acpi_object
*
out_obj
;
u8
uuid
[
16
];
u8
uuid
[
16
];
u32
errors
;
u32
errors
;
struct
acpi_buffer
output
=
{
ACPI_ALLOCATE_BUFFER
,
NULL
};
if
(
!
context
)
if
(
!
context
)
return
AE_ERROR
;
return
AE_ERROR
;
...
@@ -419,16 +420,16 @@ acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context)
...
@@ -419,16 +420,16 @@ acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context)
in_params
[
3
].
buffer
.
length
=
context
->
cap
.
length
;
in_params
[
3
].
buffer
.
length
=
context
->
cap
.
length
;
in_params
[
3
].
buffer
.
pointer
=
context
->
cap
.
pointer
;
in_params
[
3
].
buffer
.
pointer
=
context
->
cap
.
pointer
;
status
=
acpi_evaluate_object
(
handle
,
"_OSC"
,
&
input
,
&
context
->
re
t
);
status
=
acpi_evaluate_object
(
handle
,
"_OSC"
,
&
input
,
&
outpu
t
);
if
(
ACPI_FAILURE
(
status
))
if
(
ACPI_FAILURE
(
status
))
return
status
;
return
status
;
/* return buffer should have the same length as cap buffer */
if
(
!
output
.
length
)
if
(
context
->
ret
.
length
!=
context
->
cap
.
length
)
return
AE_NULL_OBJECT
;
return
AE_NULL_OBJECT
;
out_obj
=
context
->
ret
.
pointer
;
out_obj
=
output
.
pointer
;
if
(
out_obj
->
type
!=
ACPI_TYPE_BUFFER
)
{
if
(
out_obj
->
type
!=
ACPI_TYPE_BUFFER
||
out_obj
->
buffer
.
length
!=
context
->
cap
.
length
)
{
acpi_print_osc_error
(
handle
,
context
,
acpi_print_osc_error
(
handle
,
context
,
"_OSC evaluation returned wrong type"
);
"_OSC evaluation returned wrong type"
);
status
=
AE_TYPE
;
status
=
AE_TYPE
;
...
@@ -457,11 +458,20 @@ acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context)
...
@@ -457,11 +458,20 @@ acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context)
goto
out_kfree
;
goto
out_kfree
;
}
}
out_success:
out_success:
return
AE_OK
;
context
->
ret
.
length
=
out_obj
->
buffer
.
length
;
context
->
ret
.
pointer
=
kmalloc
(
context
->
ret
.
length
,
GFP_KERNEL
);
if
(
!
context
->
ret
.
pointer
)
{
status
=
AE_NO_MEMORY
;
goto
out_kfree
;
}
memcpy
(
context
->
ret
.
pointer
,
out_obj
->
buffer
.
pointer
,
context
->
ret
.
length
);
status
=
AE_OK
;
out_kfree:
out_kfree:
kfree
(
context
->
ret
.
pointer
);
kfree
(
output
.
pointer
);
context
->
ret
.
pointer
=
NULL
;
if
(
status
!=
AE_OK
)
context
->
ret
.
pointer
=
NULL
;
return
status
;
return
status
;
}
}
EXPORT_SYMBOL
(
acpi_run_osc
);
EXPORT_SYMBOL
(
acpi_run_osc
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录