Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
c2e46d2e
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
c2e46d2e
编写于
11月 20, 2007
作者:
L
Len Brown
浏览文件
操作
浏览文件
下载
差异文件
Pull procfs-default into release branch
Conflicts: drivers/acpi/sbs.c Signed-off-by:
N
Len Brown
<
len.brown@intel.com
>
上级
95b00786
65ea6520
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
46 addition
and
34 deletion
+46
-34
drivers/acpi/Kconfig
drivers/acpi/Kconfig
+15
-3
drivers/acpi/Makefile
drivers/acpi/Makefile
+1
-1
drivers/acpi/ac.c
drivers/acpi/ac.c
+10
-10
drivers/acpi/battery.c
drivers/acpi/battery.c
+10
-10
drivers/acpi/sbs.c
drivers/acpi/sbs.c
+10
-10
未找到文件。
drivers/acpi/Kconfig
浏览文件 @
c2e46d2e
...
...
@@ -50,7 +50,6 @@ config ACPI_SLEEP
config ACPI_PROCFS
bool "Deprecated /proc/acpi files"
depends on PROC_FS
default y
---help---
For backwards compatibility, this option allows
deprecated /proc/acpi/ files to exist, even when
...
...
@@ -61,7 +60,6 @@ config ACPI_PROCFS
/proc/acpi/info (/sys/modules/acpi/parameters/acpica_version)
/proc/acpi/dsdt (/sys/firmware/acpi/tables/DSDT)
/proc/acpi/fadt (/sys/firmware/acpi/tables/FACP)
/proc/acpi/battery (/sys/class/power_supply)
/proc/acpi/debug_layer (/sys/module/acpi/parameters/debug_layer)
/proc/acpi/debug_level (/sys/module/acpi/parameters/debug_level)
...
...
@@ -69,7 +67,21 @@ config ACPI_PROCFS
and functions which do not yet exist in /sys.
Say N to delete /proc/acpi/ files that have moved to /sys/
config ACPI_PROCFS_POWER
bool "Deprecated power /proc/acpi folders"
depends on PROC_FS
default y
---help---
For backwards compatibility, this option allows
deprecated power /proc/acpi/ folders to exist, even when
they have been replaced by functions in /sys.
The deprecated folders (and their replacements) include:
/proc/acpi/battery/* (/sys/class/power_supply/*)
/proc/acpi/ac_adapter/* (sys/class/power_supply/*)
This option has no effect on /proc/acpi/ folders
and functions, which do not yet exist in /sys
Say N to delete power /proc/acpi/ folders that have moved to /sys/
config ACPI_PROC_EVENT
bool "Deprecated /proc/acpi/event support"
depends on PROC_FS
...
...
drivers/acpi/Makefile
浏览文件 @
c2e46d2e
...
...
@@ -58,6 +58,6 @@ obj-$(CONFIG_ACPI_NUMA) += numa.o
obj-$(CONFIG_ACPI_ASUS)
+=
asus_acpi.o
obj-$(CONFIG_ACPI_TOSHIBA)
+=
toshiba_acpi.o
obj-$(CONFIG_ACPI_HOTPLUG_MEMORY)
+=
acpi_memhotplug.o
obj-
y
+=
cm_sbs.o
obj-
$(CONFIG_ACPI_PROCFS_POWER)
+=
cm_sbs.o
obj-$(CONFIG_ACPI_SBS)
+=
sbs.o
obj-$(CONFIG_ACPI_SBS)
+=
sbshc.o
drivers/acpi/ac.c
浏览文件 @
c2e46d2e
...
...
@@ -27,7 +27,7 @@
#include <linux/module.h>
#include <linux/init.h>
#include <linux/types.h>
#ifdef CONFIG_ACPI_PROCFS
#ifdef CONFIG_ACPI_PROCFS
_POWER
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#endif
...
...
@@ -51,7 +51,7 @@ MODULE_AUTHOR("Paul Diefenbaugh");
MODULE_DESCRIPTION
(
"ACPI AC Adapter Driver"
);
MODULE_LICENSE
(
"GPL"
);
#ifdef CONFIG_ACPI_PROCFS
#ifdef CONFIG_ACPI_PROCFS
_POWER
extern
struct
proc_dir_entry
*
acpi_lock_ac_dir
(
void
);
extern
void
*
acpi_unlock_ac_dir
(
struct
proc_dir_entry
*
acpi_ac_dir
);
static
int
acpi_ac_open_fs
(
struct
inode
*
inode
,
struct
file
*
file
);
...
...
@@ -86,7 +86,7 @@ struct acpi_ac {
#define to_acpi_ac(x) container_of(x, struct acpi_ac, charger);
#ifdef CONFIG_ACPI_PROCFS
#ifdef CONFIG_ACPI_PROCFS
_POWER
static
const
struct
file_operations
acpi_ac_fops
=
{
.
open
=
acpi_ac_open_fs
,
.
read
=
seq_read
,
...
...
@@ -136,7 +136,7 @@ static int acpi_ac_get_state(struct acpi_ac *ac)
return
0
;
}
#ifdef CONFIG_ACPI_PROCFS
#ifdef CONFIG_ACPI_PROCFS
_POWER
/* --------------------------------------------------------------------------
FS Interface (/proc)
-------------------------------------------------------------------------- */
...
...
@@ -275,7 +275,7 @@ static int acpi_ac_add(struct acpi_device *device)
if
(
result
)
goto
end
;
#ifdef CONFIG_ACPI_PROCFS
#ifdef CONFIG_ACPI_PROCFS
_POWER
result
=
acpi_ac_add_fs
(
device
);
#endif
if
(
result
)
...
...
@@ -300,7 +300,7 @@ static int acpi_ac_add(struct acpi_device *device)
end:
if
(
result
)
{
#ifdef CONFIG_ACPI_PROCFS
#ifdef CONFIG_ACPI_PROCFS
_POWER
acpi_ac_remove_fs
(
device
);
#endif
kfree
(
ac
);
...
...
@@ -339,7 +339,7 @@ static int acpi_ac_remove(struct acpi_device *device, int type)
ACPI_ALL_NOTIFY
,
acpi_ac_notify
);
if
(
ac
->
charger
.
dev
)
power_supply_unregister
(
&
ac
->
charger
);
#ifdef CONFIG_ACPI_PROCFS
#ifdef CONFIG_ACPI_PROCFS
_POWER
acpi_ac_remove_fs
(
device
);
#endif
...
...
@@ -355,7 +355,7 @@ static int __init acpi_ac_init(void)
if
(
acpi_disabled
)
return
-
ENODEV
;
#ifdef CONFIG_ACPI_PROCFS
#ifdef CONFIG_ACPI_PROCFS
_POWER
acpi_ac_dir
=
acpi_lock_ac_dir
();
if
(
!
acpi_ac_dir
)
return
-
ENODEV
;
...
...
@@ -363,7 +363,7 @@ static int __init acpi_ac_init(void)
result
=
acpi_bus_register_driver
(
&
acpi_ac_driver
);
if
(
result
<
0
)
{
#ifdef CONFIG_ACPI_PROCFS
#ifdef CONFIG_ACPI_PROCFS
_POWER
acpi_unlock_ac_dir
(
acpi_ac_dir
);
#endif
return
-
ENODEV
;
...
...
@@ -377,7 +377,7 @@ static void __exit acpi_ac_exit(void)
acpi_bus_unregister_driver
(
&
acpi_ac_driver
);
#ifdef CONFIG_ACPI_PROCFS
#ifdef CONFIG_ACPI_PROCFS
_POWER
acpi_unlock_ac_dir
(
acpi_ac_dir
);
#endif
...
...
drivers/acpi/battery.c
浏览文件 @
c2e46d2e
...
...
@@ -31,7 +31,7 @@
#include <linux/types.h>
#include <linux/jiffies.h>
#ifdef CONFIG_ACPI_PROCFS
#ifdef CONFIG_ACPI_PROCFS
_POWER
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <asm/uaccess.h>
...
...
@@ -63,7 +63,7 @@ static unsigned int cache_time = 1000;
module_param
(
cache_time
,
uint
,
0644
);
MODULE_PARM_DESC
(
cache_time
,
"cache time in milliseconds"
);
#ifdef CONFIG_ACPI_PROCFS
#ifdef CONFIG_ACPI_PROCFS
_POWER
extern
struct
proc_dir_entry
*
acpi_lock_battery_dir
(
void
);
extern
void
*
acpi_unlock_battery_dir
(
struct
proc_dir_entry
*
acpi_battery_dir
);
...
...
@@ -223,7 +223,7 @@ static enum power_supply_property energy_battery_props[] = {
POWER_SUPPLY_PROP_MANUFACTURER
,
};
#ifdef CONFIG_ACPI_PROCFS
#ifdef CONFIG_ACPI_PROCFS
_POWER
inline
char
*
acpi_battery_units
(
struct
acpi_battery
*
battery
)
{
return
(
battery
->
power_unit
)
?
"mA"
:
"mW"
;
...
...
@@ -481,7 +481,7 @@ static int acpi_battery_update(struct acpi_battery *battery)
FS Interface (/proc)
-------------------------------------------------------------------------- */
#ifdef CONFIG_ACPI_PROCFS
#ifdef CONFIG_ACPI_PROCFS
_POWER
static
struct
proc_dir_entry
*
acpi_battery_dir
;
static
int
acpi_battery_print_info
(
struct
seq_file
*
seq
,
int
result
)
...
...
@@ -788,7 +788,7 @@ static int acpi_battery_add(struct acpi_device *device)
acpi_driver_data
(
device
)
=
battery
;
mutex_init
(
&
battery
->
lock
);
acpi_battery_update
(
battery
);
#ifdef CONFIG_ACPI_PROCFS
#ifdef CONFIG_ACPI_PROCFS
_POWER
result
=
acpi_battery_add_fs
(
device
);
if
(
result
)
goto
end
;
...
...
@@ -806,7 +806,7 @@ static int acpi_battery_add(struct acpi_device *device)
device
->
status
.
battery_present
?
"present"
:
"absent"
);
end:
if
(
result
)
{
#ifdef CONFIG_ACPI_PROCFS
#ifdef CONFIG_ACPI_PROCFS
_POWER
acpi_battery_remove_fs
(
device
);
#endif
kfree
(
battery
);
...
...
@@ -825,7 +825,7 @@ static int acpi_battery_remove(struct acpi_device *device, int type)
status
=
acpi_remove_notify_handler
(
device
->
handle
,
ACPI_ALL_NOTIFY
,
acpi_battery_notify
);
#ifdef CONFIG_ACPI_PROCFS
#ifdef CONFIG_ACPI_PROCFS
_POWER
acpi_battery_remove_fs
(
device
);
#endif
sysfs_remove_battery
(
battery
);
...
...
@@ -861,13 +861,13 @@ static int __init acpi_battery_init(void)
{
if
(
acpi_disabled
)
return
-
ENODEV
;
#ifdef CONFIG_ACPI_PROCFS
#ifdef CONFIG_ACPI_PROCFS
_POWER
acpi_battery_dir
=
acpi_lock_battery_dir
();
if
(
!
acpi_battery_dir
)
return
-
ENODEV
;
#endif
if
(
acpi_bus_register_driver
(
&
acpi_battery_driver
)
<
0
)
{
#ifdef CONFIG_ACPI_PROCFS
#ifdef CONFIG_ACPI_PROCFS
_POWER
acpi_unlock_battery_dir
(
acpi_battery_dir
);
#endif
return
-
ENODEV
;
...
...
@@ -878,7 +878,7 @@ static int __init acpi_battery_init(void)
static
void
__exit
acpi_battery_exit
(
void
)
{
acpi_bus_unregister_driver
(
&
acpi_battery_driver
);
#ifdef CONFIG_ACPI_PROCFS
#ifdef CONFIG_ACPI_PROCFS
_POWER
acpi_unlock_battery_dir
(
acpi_battery_dir
);
#endif
}
...
...
drivers/acpi/sbs.c
浏览文件 @
c2e46d2e
...
...
@@ -29,7 +29,7 @@
#include <linux/moduleparam.h>
#include <linux/kernel.h>
#ifdef CONFIG_ACPI_PROCFS
#ifdef CONFIG_ACPI_PROCFS
_POWER
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <asm/uaccess.h>
...
...
@@ -88,7 +88,7 @@ MODULE_DEVICE_TABLE(acpi, sbs_device_ids);
struct
acpi_battery
{
struct
power_supply
bat
;
struct
acpi_sbs
*
sbs
;
#ifdef CONFIG_ACPI_PROCFS
#ifdef CONFIG_ACPI_PROCFS
_POWER
struct
proc_dir_entry
*
proc_entry
;
#endif
unsigned
long
update_time
;
...
...
@@ -123,7 +123,7 @@ struct acpi_sbs {
struct
acpi_device
*
device
;
struct
acpi_smb_hc
*
hc
;
struct
mutex
lock
;
#ifdef CONFIG_ACPI_PROCFS
#ifdef CONFIG_ACPI_PROCFS
_POWER
struct
proc_dir_entry
*
charger_entry
;
#endif
struct
acpi_battery
battery
[
MAX_SBS_BAT
];
...
...
@@ -469,7 +469,7 @@ static struct device_attribute alarm_attr = {
FS Interface (/proc/acpi)
-------------------------------------------------------------------------- */
#ifdef CONFIG_ACPI_PROCFS
#ifdef CONFIG_ACPI_PROCFS
_POWER
/* Generic Routines */
static
int
acpi_sbs_add_fs
(
struct
proc_dir_entry
**
dir
,
...
...
@@ -790,7 +790,7 @@ static int acpi_battery_add(struct acpi_sbs *sbs, int id)
return
result
;
sprintf
(
battery
->
name
,
ACPI_BATTERY_DIR_NAME
,
id
);
#ifdef CONFIG_ACPI_PROCFS
#ifdef CONFIG_ACPI_PROCFS
_POWER
acpi_sbs_add_fs
(
&
battery
->
proc_entry
,
acpi_battery_dir
,
battery
->
name
,
&
acpi_battery_info_fops
,
&
acpi_battery_state_fops
,
&
acpi_battery_alarm_fops
,
...
...
@@ -831,7 +831,7 @@ static void acpi_battery_remove(struct acpi_sbs *sbs, int id)
device_remove_file
(
battery
->
bat
.
dev
,
&
alarm_attr
);
power_supply_unregister
(
&
battery
->
bat
);
}
#ifdef CONFIG_ACPI_PROCFS
#ifdef CONFIG_ACPI_PROCFS
_POWER
if
(
battery
->
proc_entry
)
acpi_sbs_remove_fs
(
&
battery
->
proc_entry
,
acpi_battery_dir
);
#endif
...
...
@@ -844,7 +844,7 @@ static int acpi_charger_add(struct acpi_sbs *sbs)
result
=
acpi_ac_get_present
(
sbs
);
if
(
result
)
goto
end
;
#ifdef CONFIG_ACPI_PROCFS
#ifdef CONFIG_ACPI_PROCFS
_POWER
result
=
acpi_sbs_add_fs
(
&
sbs
->
charger_entry
,
acpi_ac_dir
,
ACPI_AC_DIR_NAME
,
NULL
,
&
acpi_ac_state_fops
,
NULL
,
sbs
);
...
...
@@ -868,7 +868,7 @@ static void acpi_charger_remove(struct acpi_sbs *sbs)
{
if
(
sbs
->
charger
.
dev
)
power_supply_unregister
(
&
sbs
->
charger
);
#ifdef CONFIG_ACPI_PROCFS
#ifdef CONFIG_ACPI_PROCFS
_POWER
if
(
sbs
->
charger_entry
)
acpi_sbs_remove_fs
(
&
sbs
->
charger_entry
,
acpi_ac_dir
);
#endif
...
...
@@ -974,7 +974,7 @@ static int acpi_sbs_remove(struct acpi_device *device, int type)
static
void
acpi_sbs_rmdirs
(
void
)
{
#ifdef CONFIG_ACPI_PROCFS
#ifdef CONFIG_ACPI_PROCFS
_POWER
if
(
acpi_ac_dir
)
{
acpi_unlock_ac_dir
(
acpi_ac_dir
);
acpi_ac_dir
=
NULL
;
...
...
@@ -1013,7 +1013,7 @@ static int __init acpi_sbs_init(void)
if
(
acpi_disabled
)
return
-
ENODEV
;
#ifdef CONFIG_ACPI_PROCFS
#ifdef CONFIG_ACPI_PROCFS
_POWER
acpi_ac_dir
=
acpi_lock_ac_dir
();
if
(
!
acpi_ac_dir
)
return
-
ENODEV
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录