Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xiphi1978
linux
提交
b8ef914e
L
linux
项目概览
xiphi1978
/
linux
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
b8ef914e
编写于
1月 09, 2009
作者:
L
Len Brown
浏览文件
操作
浏览文件
下载
差异文件
Merge branches 'release', 'bugzilla-11880', 'bugzilla-12037' and 'bugzilla-12257' into release
上级
a8e896e2
3e540486
935e5f29
7b37b5fd
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
48 addition
and
21 deletion
+48
-21
arch/x86/kernel/acpi/boot.c
arch/x86/kernel/acpi/boot.c
+11
-0
drivers/acpi/ec.c
drivers/acpi/ec.c
+22
-21
drivers/acpi/video.c
drivers/acpi/video.c
+15
-0
未找到文件。
arch/x86/kernel/acpi/boot.c
浏览文件 @
b8ef914e
...
...
@@ -1359,6 +1359,17 @@ static void __init acpi_process_madt(void)
"Invalid BIOS MADT, disabling ACPI
\n
"
);
disable_acpi
();
}
}
else
{
/*
* ACPI found no MADT, and so ACPI wants UP PIC mode.
* In the event an MPS table was found, forget it.
* Boot with "acpi=off" to use MPS on such a system.
*/
if
(
smp_found_config
)
{
printk
(
KERN_WARNING
PREFIX
"No APIC-table, disabling MPS
\n
"
);
smp_found_config
=
0
;
}
}
#endif
return
;
...
...
drivers/acpi/ec.c
浏览文件 @
b8ef914e
...
...
@@ -982,9 +982,9 @@ static const struct acpi_device_id ec_device_ids[] = {
int
__init
acpi_ec_ecdt_probe
(
void
)
{
int
ret
;
acpi_status
status
;
struct
acpi_table_ecdt
*
ecdt_ptr
;
acpi_handle
dummy
;
boot_ec
=
make_acpi_ec
();
if
(
!
boot_ec
)
...
...
@@ -1010,30 +1010,31 @@ int __init acpi_ec_ecdt_probe(void)
boot_ec
->
gpe
=
ecdt_ptr
->
gpe
;
boot_ec
->
handle
=
ACPI_ROOT_OBJECT
;
acpi_get_handle
(
ACPI_ROOT_OBJECT
,
ecdt_ptr
->
id
,
&
boot_ec
->
handle
);
}
else
{
/* This workaround is needed only on some broken machines,
* which require early EC, but fail to provide ECDT */
acpi_handle
x
;
printk
(
KERN_DEBUG
PREFIX
"Look up EC in DSDT
\n
"
);
status
=
acpi_get_devices
(
ec_device_ids
[
0
].
id
,
ec_parse_device
,
boot_ec
,
NULL
);
/* Check that acpi_get_devices actually find something */
if
(
ACPI_FAILURE
(
status
)
||
!
boot_ec
->
handle
)
goto
error
;
/* We really need to limit this workaround, the only ASUS,
* which needs it, has fake EC._INI method, so use it as flag.
* Keep boot_ec struct as it will be needed soon.
*/
if
(
ACPI_FAILURE
(
acpi_get_handle
(
boot_ec
->
handle
,
"_INI"
,
&
x
)))
return
-
ENODEV
;
/* Add some basic check against completely broken table */
if
(
boot_ec
->
data_addr
!=
boot_ec
->
command_addr
)
goto
install
;
/* fall through */
}
ret
=
ec_install_handlers
(
boot_ec
);
if
(
!
ret
)
{
/* This workaround is needed only on some broken machines,
* which require early EC, but fail to provide ECDT */
printk
(
KERN_DEBUG
PREFIX
"Look up EC in DSDT
\n
"
);
status
=
acpi_get_devices
(
ec_device_ids
[
0
].
id
,
ec_parse_device
,
boot_ec
,
NULL
);
/* Check that acpi_get_devices actually find something */
if
(
ACPI_FAILURE
(
status
)
||
!
boot_ec
->
handle
)
goto
error
;
/* We really need to limit this workaround, the only ASUS,
* which needs it, has fake EC._INI method, so use it as flag.
* Keep boot_ec struct as it will be needed soon.
*/
if
(
ACPI_FAILURE
(
acpi_get_handle
(
boot_ec
->
handle
,
"_INI"
,
&
dummy
)))
return
-
ENODEV
;
install:
if
(
!
ec_install_handlers
(
boot_ec
))
{
first_ec
=
boot_ec
;
return
0
;
}
error:
error:
kfree
(
boot_ec
);
boot_ec
=
NULL
;
return
-
ENODEV
;
...
...
drivers/acpi/video.c
浏览文件 @
b8ef914e
...
...
@@ -36,6 +36,7 @@
#include <linux/backlight.h>
#include <linux/thermal.h>
#include <linux/video_output.h>
#include <linux/sort.h>
#include <asm/uaccess.h>
#include <acpi/acpi_bus.h>
...
...
@@ -625,6 +626,16 @@ acpi_video_bus_DOS(struct acpi_video_bus *video, int bios_flag, int lcd_flag)
return
status
;
}
/*
* Simple comparison function used to sort backlight levels.
*/
static
int
acpi_video_cmp_level
(
const
void
*
a
,
const
void
*
b
)
{
return
*
(
int
*
)
a
-
*
(
int
*
)
b
;
}
/*
* Arg:
* device : video output device (LCD, CRT, ..)
...
...
@@ -676,6 +687,10 @@ acpi_video_init_brightness(struct acpi_video_device *device)
count
++
;
}
/* don't sort the first two brightness levels */
sort
(
&
br
->
levels
[
2
],
count
-
2
,
sizeof
(
br
->
levels
[
2
]),
acpi_video_cmp_level
,
NULL
);
if
(
count
<
2
)
goto
out_free_levels
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录