Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
9a38f4ee
K
Kernel
项目概览
openeuler
/
Kernel
大约 1 年 前同步成功
通知
5
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
9a38f4ee
编写于
4月 05, 2009
作者:
L
Len Brown
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'bjorn-initcall-cleanup' into release
上级
67dc0921
018f452e
变更
13
隐藏空白更改
内联
并排
Showing
13 changed file
with
80 addition
and
82 deletion
+80
-82
drivers/acpi/Makefile
drivers/acpi/Makefile
+2
-6
drivers/acpi/bus.c
drivers/acpi/bus.c
+15
-0
drivers/acpi/debug.c
drivers/acpi/debug.c
+6
-8
drivers/acpi/ec.c
drivers/acpi/ec.c
+1
-6
drivers/acpi/glue.c
drivers/acpi/glue.c
+1
-5
drivers/acpi/internal.h
drivers/acpi/internal.h
+43
-0
drivers/acpi/power.c
drivers/acpi/power.c
+1
-7
drivers/acpi/proc.c
drivers/acpi/proc.c
+1
-6
drivers/acpi/scan.c
drivers/acpi/scan.c
+3
-8
drivers/acpi/sleep.c
drivers/acpi/sleep.c
+2
-0
drivers/acpi/system.c
drivers/acpi/system.c
+2
-7
drivers/acpi/wakeup.c
drivers/acpi/wakeup.c
+3
-6
include/acpi/acpi_drivers.h
include/acpi/acpi_drivers.h
+0
-23
未找到文件。
drivers/acpi/Makefile
浏览文件 @
9a38f4ee
...
...
@@ -32,10 +32,8 @@ ifdef CONFIG_CPU_FREQ
processor-objs
+=
processor_perflib.o
endif
obj-y
+=
bus.o glue.o
obj-y
+=
scan.o
# Keep EC driver first. Initialization of others depend on it.
obj-y
+=
ec.o
obj-y
+=
bus.o glue.o scan.o ec.o
\
power.o system.o event.o
obj-$(CONFIG_ACPI_AC)
+=
ac.o
obj-$(CONFIG_ACPI_BATTERY)
+=
battery.o
obj-$(CONFIG_ACPI_BUTTON)
+=
button.o
...
...
@@ -51,8 +49,6 @@ obj-$(CONFIG_ACPI_PCI_SLOT) += pci_slot.o
obj-$(CONFIG_ACPI_PROCESSOR)
+=
processor.o
obj-$(CONFIG_ACPI_CONTAINER)
+=
container.o
obj-$(CONFIG_ACPI_THERMAL)
+=
thermal.o
obj-y
+=
power.o
obj-y
+=
system.o event.o
obj-$(CONFIG_ACPI_DEBUG)
+=
debug.o
obj-$(CONFIG_ACPI_NUMA)
+=
numa.o
obj-$(CONFIG_ACPI_HOTPLUG_MEMORY)
+=
acpi_memhotplug.o
...
...
drivers/acpi/bus.c
浏览文件 @
9a38f4ee
...
...
@@ -39,6 +39,8 @@
#include <acpi/acpi_bus.h>
#include <acpi/acpi_drivers.h>
#include "internal.h"
#define _COMPONENT ACPI_BUS_COMPONENT
ACPI_MODULE_NAME
(
"bus"
);
...
...
@@ -846,6 +848,7 @@ static int __init acpi_init(void)
acpi_kobj
=
NULL
;
}
init_acpi_device_notify
();
result
=
acpi_bus_init
();
if
(
!
result
)
{
...
...
@@ -860,11 +863,23 @@ static int __init acpi_init(void)
}
}
else
disable_acpi
();
if
(
acpi_disabled
)
return
result
;
/*
* If the laptop falls into the DMI check table, the power state check
* will be disabled in the course of device power transistion.
*/
dmi_check_system
(
power_nocheck_dmi_table
);
acpi_scan_init
();
acpi_ec_init
();
acpi_power_init
();
acpi_system_init
();
acpi_debug_init
();
acpi_sleep_proc_init
();
acpi_wakeup_device_init
();
return
result
;
}
...
...
drivers/acpi/debug.c
浏览文件 @
9a38f4ee
...
...
@@ -297,17 +297,15 @@ acpi_system_write_debug(struct file *file,
return
count
;
}
#endif
static
int
__init
acpi_debug_init
(
void
)
int
__init
acpi_debug_init
(
void
)
{
#ifdef CONFIG_ACPI_PROCFS
struct
proc_dir_entry
*
entry
;
int
error
=
0
;
char
*
name
;
if
(
acpi_disabled
)
return
0
;
/* 'debug_layer' [R/W] */
name
=
ACPI_SYSTEM_FILE_DEBUG_LAYER
;
entry
=
...
...
@@ -338,7 +336,7 @@ static int __init acpi_debug_init(void)
remove_proc_entry
(
ACPI_SYSTEM_FILE_DEBUG_LAYER
,
acpi_root_dir
);
error
=
-
ENODEV
;
goto
Done
;
}
subsys_initcall
(
acpi_debug_init
);
#else
return
0
;
#endif
}
drivers/acpi/ec.c
浏览文件 @
9a38f4ee
...
...
@@ -1069,13 +1069,10 @@ static struct acpi_driver acpi_ec_driver = {
},
};
static
int
__init
acpi_ec_init
(
void
)
int
__init
acpi_ec_init
(
void
)
{
int
result
=
0
;
if
(
acpi_disabled
)
return
0
;
acpi_ec_dir
=
proc_mkdir
(
ACPI_EC_CLASS
,
acpi_root_dir
);
if
(
!
acpi_ec_dir
)
return
-
ENODEV
;
...
...
@@ -1090,8 +1087,6 @@ static int __init acpi_ec_init(void)
return
result
;
}
subsys_initcall
(
acpi_ec_init
);
/* EC driver currently not unloadable */
#if 0
static void __exit acpi_ec_exit(void)
...
...
drivers/acpi/glue.c
浏览文件 @
9a38f4ee
...
...
@@ -286,10 +286,8 @@ static int acpi_platform_notify_remove(struct device *dev)
return
0
;
}
static
int
__init
init_acpi_device_notify
(
void
)
int
__init
init_acpi_device_notify
(
void
)
{
if
(
acpi_disabled
)
return
0
;
if
(
platform_notify
||
platform_notify_remove
)
{
printk
(
KERN_ERR
PREFIX
"Can't use platform_notify
\n
"
);
return
0
;
...
...
@@ -298,5 +296,3 @@ static int __init init_acpi_device_notify(void)
platform_notify_remove
=
acpi_platform_notify_remove
;
return
0
;
}
arch_initcall
(
init_acpi_device_notify
);
drivers/acpi/internal.h
0 → 100644
浏览文件 @
9a38f4ee
/* For use by Linux/ACPI infrastructure, not drivers */
int
init_acpi_device_notify
(
void
);
int
acpi_scan_init
(
void
);
int
acpi_system_init
(
void
);
#ifdef CONFIG_ACPI_DEBUG
int
acpi_debug_init
(
void
);
#else
static
inline
int
acpi_debug_init
(
void
)
{
return
0
;
}
#endif
/* --------------------------------------------------------------------------
Power Resource
-------------------------------------------------------------------------- */
int
acpi_power_init
(
void
);
int
acpi_device_sleep_wake
(
struct
acpi_device
*
dev
,
int
enable
,
int
sleep_state
,
int
dev_state
);
int
acpi_enable_wakeup_device_power
(
struct
acpi_device
*
dev
,
int
sleep_state
);
int
acpi_disable_wakeup_device_power
(
struct
acpi_device
*
dev
);
int
acpi_power_get_inferred_state
(
struct
acpi_device
*
device
);
int
acpi_power_transition
(
struct
acpi_device
*
device
,
int
state
);
extern
int
acpi_power_nocheck
;
int
acpi_wakeup_device_init
(
void
);
/* --------------------------------------------------------------------------
Embedded Controller
-------------------------------------------------------------------------- */
int
acpi_ec_init
(
void
);
int
acpi_ec_ecdt_probe
(
void
);
int
acpi_boot_ec_enable
(
void
);
/*--------------------------------------------------------------------------
Suspend/Resume
-------------------------------------------------------------------------- */
extern
int
acpi_sleep_init
(
void
);
#ifdef CONFIG_ACPI_SLEEP
int
acpi_sleep_proc_init
(
void
);
#else
static
inline
int
acpi_sleep_proc_init
(
void
)
{
return
0
;
}
#endif
drivers/acpi/power.c
浏览文件 @
9a38f4ee
...
...
@@ -773,14 +773,10 @@ static int acpi_power_resume(struct acpi_device *device)
return
0
;
}
static
int
__init
acpi_power_init
(
void
)
int
__init
acpi_power_init
(
void
)
{
int
result
=
0
;
if
(
acpi_disabled
)
return
0
;
INIT_LIST_HEAD
(
&
acpi_power_resource_list
);
acpi_power_dir
=
proc_mkdir
(
ACPI_POWER_CLASS
,
acpi_root_dir
);
...
...
@@ -795,5 +791,3 @@ static int __init acpi_power_init(void)
return
0
;
}
subsys_initcall
(
acpi_power_init
);
drivers/acpi/proc.c
浏览文件 @
9a38f4ee
...
...
@@ -496,11 +496,8 @@ static u32 rtc_handler(void *context)
}
#endif
/* HAVE_ACPI_LEGACY_ALARM */
static
int
__init
acpi_sleep_proc_init
(
void
)
int
__init
acpi_sleep_proc_init
(
void
)
{
if
(
acpi_disabled
)
return
0
;
#ifdef CONFIG_ACPI_PROCFS
/* 'sleep' [R/W] */
proc_create
(
"sleep"
,
S_IFREG
|
S_IRUGO
|
S_IWUSR
,
...
...
@@ -527,5 +524,3 @@ static int __init acpi_sleep_proc_init(void)
return
0
;
}
late_initcall
(
acpi_sleep_proc_init
);
drivers/acpi/scan.c
浏览文件 @
9a38f4ee
...
...
@@ -11,6 +11,8 @@
#include <acpi/acpi_drivers.h>
#include "internal.h"
#define _COMPONENT ACPI_BUS_COMPONENT
ACPI_MODULE_NAME
(
"scan"
);
#define STRUCT_TO_INT(s) (*((int*)&s))
...
...
@@ -1524,16 +1526,11 @@ static int acpi_bus_scan_fixed(struct acpi_device *root)
return
result
;
}
static
int
__init
acpi_scan_init
(
void
)
int
__init
acpi_scan_init
(
void
)
{
int
result
;
struct
acpi_bus_ops
ops
;
if
(
acpi_disabled
)
return
0
;
memset
(
&
ops
,
0
,
sizeof
(
ops
));
ops
.
acpi_op_add
=
1
;
ops
.
acpi_op_start
=
1
;
...
...
@@ -1566,5 +1563,3 @@ static int __init acpi_scan_init(void)
Done:
return
result
;
}
subsys_initcall
(
acpi_scan_init
);
drivers/acpi/sleep.c
浏览文件 @
9a38f4ee
...
...
@@ -21,6 +21,8 @@
#include <acpi/acpi_bus.h>
#include <acpi/acpi_drivers.h>
#include "internal.h"
#include "sleep.h"
u8
sleep_states
[
ACPI_S_STATE_COUNT
];
...
...
drivers/acpi/system.c
浏览文件 @
9a38f4ee
...
...
@@ -571,12 +571,9 @@ static int acpi_system_procfs_init(void)
}
#endif
static
int
__init
acpi_system_init
(
void
)
int
__init
acpi_system_init
(
void
)
{
int
result
=
0
;
if
(
acpi_disabled
)
return
0
;
int
result
;
result
=
acpi_system_procfs_init
();
if
(
result
)
...
...
@@ -586,5 +583,3 @@ static int __init acpi_system_init(void)
return
result
;
}
subsys_initcall
(
acpi_system_init
);
drivers/acpi/wakeup.c
浏览文件 @
9a38f4ee
...
...
@@ -8,6 +8,8 @@
#include <acpi/acpi_drivers.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include "internal.h"
#include "sleep.h"
#define _COMPONENT ACPI_SYSTEM_COMPONENT
...
...
@@ -136,13 +138,10 @@ void acpi_disable_wakeup_device(u8 sleep_state)
spin_unlock
(
&
acpi_device_lock
);
}
static
int
__init
acpi_wakeup_device_init
(
void
)
int
__init
acpi_wakeup_device_init
(
void
)
{
struct
list_head
*
node
,
*
next
;
if
(
acpi_disabled
)
return
0
;
spin_lock
(
&
acpi_device_lock
);
list_for_each_safe
(
node
,
next
,
&
acpi_wakeup_device_list
)
{
struct
acpi_device
*
dev
=
container_of
(
node
,
...
...
@@ -163,5 +162,3 @@ static int __init acpi_wakeup_device_init(void)
spin_unlock
(
&
acpi_device_lock
);
return
0
;
}
late_initcall
(
acpi_wakeup_device_init
);
include/acpi/acpi_drivers.h
浏览文件 @
9a38f4ee
...
...
@@ -98,24 +98,6 @@ int acpi_pci_bind_root(struct acpi_device *device, struct acpi_pci_id *id,
struct
pci_bus
*
pci_acpi_scan_root
(
struct
acpi_device
*
device
,
int
domain
,
int
bus
);
/* --------------------------------------------------------------------------
Power Resource
-------------------------------------------------------------------------- */
int
acpi_device_sleep_wake
(
struct
acpi_device
*
dev
,
int
enable
,
int
sleep_state
,
int
dev_state
);
int
acpi_enable_wakeup_device_power
(
struct
acpi_device
*
dev
,
int
sleep_state
);
int
acpi_disable_wakeup_device_power
(
struct
acpi_device
*
dev
);
int
acpi_power_get_inferred_state
(
struct
acpi_device
*
device
);
int
acpi_power_transition
(
struct
acpi_device
*
device
,
int
state
);
extern
int
acpi_power_nocheck
;
/* --------------------------------------------------------------------------
Embedded Controller
-------------------------------------------------------------------------- */
int
acpi_ec_ecdt_probe
(
void
);
int
acpi_boot_ec_enable
(
void
);
/* --------------------------------------------------------------------------
Processor
-------------------------------------------------------------------------- */
...
...
@@ -165,9 +147,4 @@ static inline void unregister_hotplug_dock_device(acpi_handle handle)
}
#endif
/*--------------------------------------------------------------------------
Suspend/Resume
-------------------------------------------------------------------------- */
extern
int
acpi_sleep_init
(
void
);
#endif
/*__ACPI_DRIVERS_H__*/
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录