Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
cece9014
K
Kernel
项目概览
openeuler
/
Kernel
接近 2 年 前同步成功
通知
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看板
提交
cece9014
编写于
12月 16, 2006
作者:
L
Len Brown
浏览文件
操作
浏览文件
下载
差异文件
Pull style into test branch
Conflicts: drivers/acpi/button.c drivers/acpi/ec.c drivers/acpi/osl.c drivers/acpi/sbs.c
上级
cfee47f9
50dd0969
变更
28
显示空白变更内容
内联
并排
Showing
28 changed file
with
128 addition
and
134 deletion
+128
-134
drivers/acpi/ac.c
drivers/acpi/ac.c
+3
-3
drivers/acpi/acpi_memhotplug.c
drivers/acpi/acpi_memhotplug.c
+1
-1
drivers/acpi/asus_acpi.c
drivers/acpi/asus_acpi.c
+3
-4
drivers/acpi/battery.c
drivers/acpi/battery.c
+11
-11
drivers/acpi/container.c
drivers/acpi/container.c
+1
-1
drivers/acpi/dock.c
drivers/acpi/dock.c
+3
-3
drivers/acpi/fan.c
drivers/acpi/fan.c
+3
-3
drivers/acpi/glue.c
drivers/acpi/glue.c
+2
-2
drivers/acpi/hotkey.c
drivers/acpi/hotkey.c
+2
-3
drivers/acpi/i2c_ec.c
drivers/acpi/i2c_ec.c
+1
-1
drivers/acpi/ibm_acpi.c
drivers/acpi/ibm_acpi.c
+3
-3
drivers/acpi/numa.c
drivers/acpi/numa.c
+1
-1
drivers/acpi/osl.c
drivers/acpi/osl.c
+2
-1
drivers/acpi/pci_bind.c
drivers/acpi/pci_bind.c
+2
-2
drivers/acpi/pci_irq.c
drivers/acpi/pci_irq.c
+1
-1
drivers/acpi/pci_link.c
drivers/acpi/pci_link.c
+4
-4
drivers/acpi/pci_root.c
drivers/acpi/pci_root.c
+2
-2
drivers/acpi/power.c
drivers/acpi/power.c
+3
-3
drivers/acpi/processor_core.c
drivers/acpi/processor_core.c
+5
-5
drivers/acpi/processor_idle.c
drivers/acpi/processor_idle.c
+7
-7
drivers/acpi/processor_perflib.c
drivers/acpi/processor_perflib.c
+5
-5
drivers/acpi/processor_thermal.c
drivers/acpi/processor_thermal.c
+3
-3
drivers/acpi/processor_throttling.c
drivers/acpi/processor_throttling.c
+3
-3
drivers/acpi/sbs.c
drivers/acpi/sbs.c
+12
-12
drivers/acpi/tables.c
drivers/acpi/tables.c
+1
-1
drivers/acpi/thermal.c
drivers/acpi/thermal.c
+15
-15
drivers/acpi/utils.c
drivers/acpi/utils.c
+2
-2
drivers/acpi/video.c
drivers/acpi/video.c
+27
-32
未找到文件。
drivers/acpi/ac.c
浏览文件 @
cece9014
...
@@ -109,7 +109,7 @@ static struct proc_dir_entry *acpi_ac_dir;
...
@@ -109,7 +109,7 @@ static struct proc_dir_entry *acpi_ac_dir;
static
int
acpi_ac_seq_show
(
struct
seq_file
*
seq
,
void
*
offset
)
static
int
acpi_ac_seq_show
(
struct
seq_file
*
seq
,
void
*
offset
)
{
{
struct
acpi_ac
*
ac
=
(
struct
acpi_ac
*
)
seq
->
private
;
struct
acpi_ac
*
ac
=
seq
->
private
;
if
(
!
ac
)
if
(
!
ac
)
...
@@ -187,7 +187,7 @@ static int acpi_ac_remove_fs(struct acpi_device *device)
...
@@ -187,7 +187,7 @@ static int acpi_ac_remove_fs(struct acpi_device *device)
static
void
acpi_ac_notify
(
acpi_handle
handle
,
u32
event
,
void
*
data
)
static
void
acpi_ac_notify
(
acpi_handle
handle
,
u32
event
,
void
*
data
)
{
{
struct
acpi_ac
*
ac
=
(
struct
acpi_ac
*
)
data
;
struct
acpi_ac
*
ac
=
data
;
struct
acpi_device
*
device
=
NULL
;
struct
acpi_device
*
device
=
NULL
;
...
@@ -269,7 +269,7 @@ static int acpi_ac_remove(struct acpi_device *device, int type)
...
@@ -269,7 +269,7 @@ static int acpi_ac_remove(struct acpi_device *device, int type)
if
(
!
device
||
!
acpi_driver_data
(
device
))
if
(
!
device
||
!
acpi_driver_data
(
device
))
return
-
EINVAL
;
return
-
EINVAL
;
ac
=
(
struct
acpi_ac
*
)
acpi_driver_data
(
device
);
ac
=
acpi_driver_data
(
device
);
status
=
acpi_remove_notify_handler
(
device
->
handle
,
status
=
acpi_remove_notify_handler
(
device
->
handle
,
ACPI_ALL_NOTIFY
,
acpi_ac_notify
);
ACPI_ALL_NOTIFY
,
acpi_ac_notify
);
...
...
drivers/acpi/acpi_memhotplug.c
浏览文件 @
cece9014
...
@@ -429,7 +429,7 @@ static int acpi_memory_device_remove(struct acpi_device *device, int type)
...
@@ -429,7 +429,7 @@ static int acpi_memory_device_remove(struct acpi_device *device, int type)
if
(
!
device
||
!
acpi_driver_data
(
device
))
if
(
!
device
||
!
acpi_driver_data
(
device
))
return
-
EINVAL
;
return
-
EINVAL
;
mem_device
=
(
struct
acpi_memory_device
*
)
acpi_driver_data
(
device
);
mem_device
=
acpi_driver_data
(
device
);
kfree
(
mem_device
);
kfree
(
mem_device
);
return
0
;
return
0
;
...
...
drivers/acpi/asus_acpi.c
浏览文件 @
cece9014
...
@@ -1146,7 +1146,7 @@ static int asus_hotk_get_info(void)
...
@@ -1146,7 +1146,7 @@ static int asus_hotk_get_info(void)
if
(
ACPI_FAILURE
(
status
))
if
(
ACPI_FAILURE
(
status
))
printk
(
KERN_WARNING
" Couldn't get the DSDT table header
\n
"
);
printk
(
KERN_WARNING
" Couldn't get the DSDT table header
\n
"
);
else
else
asus_info
=
(
struct
acpi_table_header
*
)
dsdt
.
pointer
;
asus_info
=
dsdt
.
pointer
;
/* We have to write 0 on init this far for all ASUS models */
/* We have to write 0 on init this far for all ASUS models */
if
(
!
write_acpi_int
(
hotk
->
handle
,
"INIT"
,
0
,
&
buffer
))
{
if
(
!
write_acpi_int
(
hotk
->
handle
,
"INIT"
,
0
,
&
buffer
))
{
...
@@ -1168,7 +1168,7 @@ static int asus_hotk_get_info(void)
...
@@ -1168,7 +1168,7 @@ static int asus_hotk_get_info(void)
* asus_model_match() and try something completely different.
* asus_model_match() and try something completely different.
*/
*/
if
(
buffer
.
pointer
)
{
if
(
buffer
.
pointer
)
{
model
=
(
union
acpi_object
*
)
buffer
.
pointer
;
model
=
buffer
.
pointer
;
switch
(
model
->
type
)
{
switch
(
model
->
type
)
{
case
ACPI_TYPE_STRING
:
case
ACPI_TYPE_STRING
:
string
=
model
->
string
.
pointer
;
string
=
model
->
string
.
pointer
;
...
@@ -1264,8 +1264,7 @@ static int asus_hotk_add(struct acpi_device *device)
...
@@ -1264,8 +1264,7 @@ static int asus_hotk_add(struct acpi_device *device)
printk
(
KERN_NOTICE
"Asus Laptop ACPI Extras version %s
\n
"
,
printk
(
KERN_NOTICE
"Asus Laptop ACPI Extras version %s
\n
"
,
ASUS_ACPI_VERSION
);
ASUS_ACPI_VERSION
);
hotk
=
hotk
=
kmalloc
(
sizeof
(
struct
asus_hotk
),
GFP_KERNEL
);
(
struct
asus_hotk
*
)
kmalloc
(
sizeof
(
struct
asus_hotk
),
GFP_KERNEL
);
if
(
!
hotk
)
if
(
!
hotk
)
return
-
ENOMEM
;
return
-
ENOMEM
;
memset
(
hotk
,
0
,
sizeof
(
struct
asus_hotk
));
memset
(
hotk
,
0
,
sizeof
(
struct
asus_hotk
));
...
...
drivers/acpi/battery.c
浏览文件 @
cece9014
...
@@ -149,7 +149,7 @@ acpi_battery_get_info(struct acpi_battery *battery,
...
@@ -149,7 +149,7 @@ acpi_battery_get_info(struct acpi_battery *battery,
return
-
ENODEV
;
return
-
ENODEV
;
}
}
package
=
(
union
acpi_object
*
)
buffer
.
pointer
;
package
=
buffer
.
pointer
;
/* Extract Package Data */
/* Extract Package Data */
...
@@ -179,7 +179,7 @@ acpi_battery_get_info(struct acpi_battery *battery,
...
@@ -179,7 +179,7 @@ acpi_battery_get_info(struct acpi_battery *battery,
kfree
(
buffer
.
pointer
);
kfree
(
buffer
.
pointer
);
if
(
!
result
)
if
(
!
result
)
(
*
bif
)
=
(
struct
acpi_battery_info
*
)
data
.
pointer
;
(
*
bif
)
=
data
.
pointer
;
return
result
;
return
result
;
}
}
...
@@ -209,7 +209,7 @@ acpi_battery_get_status(struct acpi_battery *battery,
...
@@ -209,7 +209,7 @@ acpi_battery_get_status(struct acpi_battery *battery,
return
-
ENODEV
;
return
-
ENODEV
;
}
}
package
=
(
union
acpi_object
*
)
buffer
.
pointer
;
package
=
buffer
.
pointer
;
/* Extract Package Data */
/* Extract Package Data */
...
@@ -239,7 +239,7 @@ acpi_battery_get_status(struct acpi_battery *battery,
...
@@ -239,7 +239,7 @@ acpi_battery_get_status(struct acpi_battery *battery,
kfree
(
buffer
.
pointer
);
kfree
(
buffer
.
pointer
);
if
(
!
result
)
if
(
!
result
)
(
*
bst
)
=
(
struct
acpi_battery_status
*
)
data
.
pointer
;
(
*
bst
)
=
data
.
pointer
;
return
result
;
return
result
;
}
}
...
@@ -334,7 +334,7 @@ static struct proc_dir_entry *acpi_battery_dir;
...
@@ -334,7 +334,7 @@ static struct proc_dir_entry *acpi_battery_dir;
static
int
acpi_battery_read_info
(
struct
seq_file
*
seq
,
void
*
offset
)
static
int
acpi_battery_read_info
(
struct
seq_file
*
seq
,
void
*
offset
)
{
{
int
result
=
0
;
int
result
=
0
;
struct
acpi_battery
*
battery
=
(
struct
acpi_battery
*
)
seq
->
private
;
struct
acpi_battery
*
battery
=
seq
->
private
;
struct
acpi_battery_info
*
bif
=
NULL
;
struct
acpi_battery_info
*
bif
=
NULL
;
char
*
units
=
"?"
;
char
*
units
=
"?"
;
...
@@ -418,7 +418,7 @@ static int acpi_battery_info_open_fs(struct inode *inode, struct file *file)
...
@@ -418,7 +418,7 @@ static int acpi_battery_info_open_fs(struct inode *inode, struct file *file)
static
int
acpi_battery_read_state
(
struct
seq_file
*
seq
,
void
*
offset
)
static
int
acpi_battery_read_state
(
struct
seq_file
*
seq
,
void
*
offset
)
{
{
int
result
=
0
;
int
result
=
0
;
struct
acpi_battery
*
battery
=
(
struct
acpi_battery
*
)
seq
->
private
;
struct
acpi_battery
*
battery
=
seq
->
private
;
struct
acpi_battery_status
*
bst
=
NULL
;
struct
acpi_battery_status
*
bst
=
NULL
;
char
*
units
=
"?"
;
char
*
units
=
"?"
;
...
@@ -494,7 +494,7 @@ static int acpi_battery_state_open_fs(struct inode *inode, struct file *file)
...
@@ -494,7 +494,7 @@ static int acpi_battery_state_open_fs(struct inode *inode, struct file *file)
static
int
acpi_battery_read_alarm
(
struct
seq_file
*
seq
,
void
*
offset
)
static
int
acpi_battery_read_alarm
(
struct
seq_file
*
seq
,
void
*
offset
)
{
{
struct
acpi_battery
*
battery
=
(
struct
acpi_battery
*
)
seq
->
private
;
struct
acpi_battery
*
battery
=
seq
->
private
;
char
*
units
=
"?"
;
char
*
units
=
"?"
;
...
@@ -531,8 +531,8 @@ acpi_battery_write_alarm(struct file *file,
...
@@ -531,8 +531,8 @@ acpi_battery_write_alarm(struct file *file,
{
{
int
result
=
0
;
int
result
=
0
;
char
alarm_string
[
12
]
=
{
'\0'
};
char
alarm_string
[
12
]
=
{
'\0'
};
struct
seq_file
*
m
=
(
struct
seq_file
*
)
file
->
private_data
;
struct
seq_file
*
m
=
file
->
private_data
;
struct
acpi_battery
*
battery
=
(
struct
acpi_battery
*
)
m
->
private
;
struct
acpi_battery
*
battery
=
m
->
private
;
if
(
!
battery
||
(
count
>
sizeof
(
alarm_string
)
-
1
))
if
(
!
battery
||
(
count
>
sizeof
(
alarm_string
)
-
1
))
...
@@ -658,7 +658,7 @@ static int acpi_battery_remove_fs(struct acpi_device *device)
...
@@ -658,7 +658,7 @@ static int acpi_battery_remove_fs(struct acpi_device *device)
static
void
acpi_battery_notify
(
acpi_handle
handle
,
u32
event
,
void
*
data
)
static
void
acpi_battery_notify
(
acpi_handle
handle
,
u32
event
,
void
*
data
)
{
{
struct
acpi_battery
*
battery
=
(
struct
acpi_battery
*
)
data
;
struct
acpi_battery
*
battery
=
data
;
struct
acpi_device
*
device
=
NULL
;
struct
acpi_device
*
device
=
NULL
;
...
@@ -742,7 +742,7 @@ static int acpi_battery_remove(struct acpi_device *device, int type)
...
@@ -742,7 +742,7 @@ static int acpi_battery_remove(struct acpi_device *device, int type)
if
(
!
device
||
!
acpi_driver_data
(
device
))
if
(
!
device
||
!
acpi_driver_data
(
device
))
return
-
EINVAL
;
return
-
EINVAL
;
battery
=
(
struct
acpi_battery
*
)
acpi_driver_data
(
device
);
battery
=
acpi_driver_data
(
device
);
status
=
acpi_remove_notify_handler
(
device
->
handle
,
status
=
acpi_remove_notify_handler
(
device
->
handle
,
ACPI_ALL_NOTIFY
,
ACPI_ALL_NOTIFY
,
...
...
drivers/acpi/container.c
浏览文件 @
cece9014
...
@@ -117,7 +117,7 @@ static int acpi_container_remove(struct acpi_device *device, int type)
...
@@ -117,7 +117,7 @@ static int acpi_container_remove(struct acpi_device *device, int type)
acpi_status
status
=
AE_OK
;
acpi_status
status
=
AE_OK
;
struct
acpi_container
*
pc
=
NULL
;
struct
acpi_container
*
pc
=
NULL
;
pc
=
(
struct
acpi_container
*
)
acpi_driver_data
(
device
);
pc
=
acpi_driver_data
(
device
);
kfree
(
pc
);
kfree
(
pc
);
return
status
;
return
status
;
}
}
...
...
drivers/acpi/dock.c
浏览文件 @
cece9014
...
@@ -565,7 +565,7 @@ static int handle_eject_request(struct dock_station *ds, u32 event)
...
@@ -565,7 +565,7 @@ static int handle_eject_request(struct dock_station *ds, u32 event)
*/
*/
static
void
dock_notify
(
acpi_handle
handle
,
u32
event
,
void
*
data
)
static
void
dock_notify
(
acpi_handle
handle
,
u32
event
,
void
*
data
)
{
{
struct
dock_station
*
ds
=
(
struct
dock_station
*
)
data
;
struct
dock_station
*
ds
=
data
;
switch
(
event
)
{
switch
(
event
)
{
case
ACPI_NOTIFY_BUS_CHECK
:
case
ACPI_NOTIFY_BUS_CHECK
:
...
@@ -616,7 +616,7 @@ find_dock_devices(acpi_handle handle, u32 lvl, void *context, void **rv)
...
@@ -616,7 +616,7 @@ find_dock_devices(acpi_handle handle, u32 lvl, void *context, void **rv)
{
{
acpi_status
status
;
acpi_status
status
;
acpi_handle
tmp
;
acpi_handle
tmp
;
struct
dock_station
*
ds
=
(
struct
dock_station
*
)
context
;
struct
dock_station
*
ds
=
context
;
struct
dock_dependent_device
*
dd
;
struct
dock_dependent_device
*
dd
;
status
=
acpi_bus_get_ejd
(
handle
,
&
tmp
);
status
=
acpi_bus_get_ejd
(
handle
,
&
tmp
);
...
@@ -792,7 +792,7 @@ static int dock_remove(void)
...
@@ -792,7 +792,7 @@ static int dock_remove(void)
static
acpi_status
static
acpi_status
find_dock
(
acpi_handle
handle
,
u32
lvl
,
void
*
context
,
void
**
rv
)
find_dock
(
acpi_handle
handle
,
u32
lvl
,
void
*
context
,
void
**
rv
)
{
{
int
*
count
=
(
int
*
)
context
;
int
*
count
=
context
;
acpi_status
status
=
AE_OK
;
acpi_status
status
=
AE_OK
;
if
(
is_dock
(
handle
))
{
if
(
is_dock
(
handle
))
{
...
...
drivers/acpi/fan.c
浏览文件 @
cece9014
...
@@ -99,8 +99,8 @@ acpi_fan_write_state(struct file *file, const char __user * buffer,
...
@@ -99,8 +99,8 @@ acpi_fan_write_state(struct file *file, const char __user * buffer,
size_t
count
,
loff_t
*
ppos
)
size_t
count
,
loff_t
*
ppos
)
{
{
int
result
=
0
;
int
result
=
0
;
struct
seq_file
*
m
=
(
struct
seq_file
*
)
file
->
private_data
;
struct
seq_file
*
m
=
file
->
private_data
;
struct
acpi_fan
*
fan
=
(
struct
acpi_fan
*
)
m
->
private
;
struct
acpi_fan
*
fan
=
m
->
private
;
char
state_string
[
12
]
=
{
'\0'
};
char
state_string
[
12
]
=
{
'\0'
};
...
@@ -229,7 +229,7 @@ static int acpi_fan_remove(struct acpi_device *device, int type)
...
@@ -229,7 +229,7 @@ static int acpi_fan_remove(struct acpi_device *device, int type)
if
(
!
device
||
!
acpi_driver_data
(
device
))
if
(
!
device
||
!
acpi_driver_data
(
device
))
return
-
EINVAL
;
return
-
EINVAL
;
fan
=
(
struct
acpi_fan
*
)
acpi_driver_data
(
device
);
fan
=
acpi_driver_data
(
device
);
acpi_fan_remove_fs
(
device
);
acpi_fan_remove_fs
(
device
);
...
...
drivers/acpi/glue.c
浏览文件 @
cece9014
...
@@ -96,7 +96,7 @@ struct acpi_find_pci_root {
...
@@ -96,7 +96,7 @@ struct acpi_find_pci_root {
static
acpi_status
static
acpi_status
do_root_bridge_busnr_callback
(
struct
acpi_resource
*
resource
,
void
*
data
)
do_root_bridge_busnr_callback
(
struct
acpi_resource
*
resource
,
void
*
data
)
{
{
unsigned
long
*
busnr
=
(
unsigned
long
*
)
data
;
unsigned
long
*
busnr
=
data
;
struct
acpi_resource_address64
address
;
struct
acpi_resource_address64
address
;
if
(
resource
->
type
!=
ACPI_RESOURCE_TYPE_ADDRESS16
&&
if
(
resource
->
type
!=
ACPI_RESOURCE_TYPE_ADDRESS16
&&
...
@@ -221,7 +221,7 @@ do_acpi_find_child(acpi_handle handle, u32 lvl, void *context, void **rv)
...
@@ -221,7 +221,7 @@ do_acpi_find_child(acpi_handle handle, u32 lvl, void *context, void **rv)
acpi_status
status
;
acpi_status
status
;
struct
acpi_device_info
*
info
;
struct
acpi_device_info
*
info
;
struct
acpi_buffer
buffer
=
{
ACPI_ALLOCATE_BUFFER
,
NULL
};
struct
acpi_buffer
buffer
=
{
ACPI_ALLOCATE_BUFFER
,
NULL
};
struct
acpi_find_child
*
find
=
(
struct
acpi_find_child
*
)
context
;
struct
acpi_find_child
*
find
=
context
;
status
=
acpi_get_object_info
(
handle
,
&
buffer
);
status
=
acpi_get_object_info
(
handle
,
&
buffer
);
if
(
ACPI_SUCCESS
(
status
))
{
if
(
ACPI_SUCCESS
(
status
))
{
...
...
drivers/acpi/hotkey.c
浏览文件 @
cece9014
...
@@ -265,8 +265,7 @@ static char *format_result(union acpi_object *object)
...
@@ -265,8 +265,7 @@ static char *format_result(union acpi_object *object)
static
int
hotkey_polling_seq_show
(
struct
seq_file
*
seq
,
void
*
offset
)
static
int
hotkey_polling_seq_show
(
struct
seq_file
*
seq
,
void
*
offset
)
{
{
struct
acpi_polling_hotkey
*
poll_hotkey
=
struct
acpi_polling_hotkey
*
poll_hotkey
=
seq
->
private
;
(
struct
acpi_polling_hotkey
*
)
seq
->
private
;
char
*
buf
;
char
*
buf
;
...
@@ -577,7 +576,7 @@ init_poll_hotkey_device(union acpi_hotkey *key, char **config_entry,
...
@@ -577,7 +576,7 @@ init_poll_hotkey_device(union acpi_hotkey *key, char **config_entry,
if
(
ACPI_FAILURE
(
status
))
if
(
ACPI_FAILURE
(
status
))
goto
do_fail_zero
;
goto
do_fail_zero
;
key
->
poll_hotkey
.
poll_result
=
key
->
poll_hotkey
.
poll_result
=
(
union
acpi_object
*
)
kmalloc
(
sizeof
(
union
acpi_object
),
GFP_KERNEL
);
kmalloc
(
sizeof
(
union
acpi_object
),
GFP_KERNEL
);
if
(
!
key
->
poll_hotkey
.
poll_result
)
if
(
!
key
->
poll_hotkey
.
poll_result
)
goto
do_fail_zero
;
goto
do_fail_zero
;
return
AE_OK
;
return
AE_OK
;
...
...
drivers/acpi/i2c_ec.c
浏览文件 @
cece9014
...
@@ -393,7 +393,7 @@ static void __exit acpi_ec_hc_exit(void)
...
@@ -393,7 +393,7 @@ static void __exit acpi_ec_hc_exit(void)
struct
acpi_ec_hc
*
acpi_get_ec_hc
(
struct
acpi_device
*
device
)
struct
acpi_ec_hc
*
acpi_get_ec_hc
(
struct
acpi_device
*
device
)
{
{
return
((
struct
acpi_ec_hc
*
)
acpi_driver_data
(
device
->
parent
)
);
return
acpi_driver_data
(
device
->
parent
);
}
}
EXPORT_SYMBOL
(
acpi_get_ec_hc
);
EXPORT_SYMBOL
(
acpi_get_ec_hc
);
...
...
drivers/acpi/ibm_acpi.c
浏览文件 @
cece9014
...
@@ -2417,7 +2417,7 @@ static struct ibm_struct ibms[] = {
...
@@ -2417,7 +2417,7 @@ static struct ibm_struct ibms[] = {
static
int
dispatch_read
(
char
*
page
,
char
**
start
,
off_t
off
,
int
count
,
static
int
dispatch_read
(
char
*
page
,
char
**
start
,
off_t
off
,
int
count
,
int
*
eof
,
void
*
data
)
int
*
eof
,
void
*
data
)
{
{
struct
ibm_struct
*
ibm
=
(
struct
ibm_struct
*
)
data
;
struct
ibm_struct
*
ibm
=
data
;
int
len
;
int
len
;
if
(
!
ibm
||
!
ibm
->
read
)
if
(
!
ibm
||
!
ibm
->
read
)
...
@@ -2442,7 +2442,7 @@ static int dispatch_read(char *page, char **start, off_t off, int count,
...
@@ -2442,7 +2442,7 @@ static int dispatch_read(char *page, char **start, off_t off, int count,
static
int
dispatch_write
(
struct
file
*
file
,
const
char
__user
*
userbuf
,
static
int
dispatch_write
(
struct
file
*
file
,
const
char
__user
*
userbuf
,
unsigned
long
count
,
void
*
data
)
unsigned
long
count
,
void
*
data
)
{
{
struct
ibm_struct
*
ibm
=
(
struct
ibm_struct
*
)
data
;
struct
ibm_struct
*
ibm
=
data
;
char
*
kernbuf
;
char
*
kernbuf
;
int
ret
;
int
ret
;
...
@@ -2471,7 +2471,7 @@ static int dispatch_write(struct file *file, const char __user * userbuf,
...
@@ -2471,7 +2471,7 @@ static int dispatch_write(struct file *file, const char __user * userbuf,
static
void
dispatch_notify
(
acpi_handle
handle
,
u32
event
,
void
*
data
)
static
void
dispatch_notify
(
acpi_handle
handle
,
u32
event
,
void
*
data
)
{
{
struct
ibm_struct
*
ibm
=
(
struct
ibm_struct
*
)
data
;
struct
ibm_struct
*
ibm
=
data
;
if
(
!
ibm
||
!
ibm
->
notify
)
if
(
!
ibm
||
!
ibm
->
notify
)
return
;
return
;
...
...
drivers/acpi/numa.c
浏览文件 @
cece9014
...
@@ -248,7 +248,7 @@ int acpi_get_pxm(acpi_handle h)
...
@@ -248,7 +248,7 @@ int acpi_get_pxm(acpi_handle h)
handle
=
phandle
;
handle
=
phandle
;
status
=
acpi_evaluate_integer
(
handle
,
"_PXM"
,
NULL
,
&
pxm
);
status
=
acpi_evaluate_integer
(
handle
,
"_PXM"
,
NULL
,
&
pxm
);
if
(
ACPI_SUCCESS
(
status
))
if
(
ACPI_SUCCESS
(
status
))
return
(
int
)
pxm
;
return
pxm
;
status
=
acpi_get_parent
(
handle
,
&
phandle
);
status
=
acpi_get_parent
(
handle
,
&
phandle
);
}
while
(
ACPI_SUCCESS
(
status
));
}
while
(
ACPI_SUCCESS
(
status
));
return
-
1
;
return
-
1
;
...
...
drivers/acpi/osl.c
浏览文件 @
cece9014
...
@@ -568,6 +568,7 @@ void acpi_os_derive_pci_id(acpi_handle rhandle, /* upper bound */
...
@@ -568,6 +568,7 @@ void acpi_os_derive_pci_id(acpi_handle rhandle, /* upper bound */
static
void
acpi_os_execute_deferred
(
struct
work_struct
*
work
)
static
void
acpi_os_execute_deferred
(
struct
work_struct
*
work
)
{
{
struct
acpi_os_dpc
*
dpc
=
container_of
(
work
,
struct
acpi_os_dpc
,
work
);
struct
acpi_os_dpc
*
dpc
=
container_of
(
work
,
struct
acpi_os_dpc
,
work
);
if
(
!
dpc
)
{
if
(
!
dpc
)
{
printk
(
KERN_ERR
PREFIX
"Invalid (NULL) context
\n
"
);
printk
(
KERN_ERR
PREFIX
"Invalid (NULL) context
\n
"
);
return
;
return
;
...
@@ -1051,7 +1052,7 @@ acpi_os_create_cache(char *name, u16 size, u16 depth, acpi_cache_t ** cache)
...
@@ -1051,7 +1052,7 @@ acpi_os_create_cache(char *name, u16 size, u16 depth, acpi_cache_t ** cache)
acpi_status
acpi_os_purge_cache
(
acpi_cache_t
*
cache
)
acpi_status
acpi_os_purge_cache
(
acpi_cache_t
*
cache
)
{
{
(
void
)
kmem_cache_shrink
(
cache
);
kmem_cache_shrink
(
cache
);
return
(
AE_OK
);
return
(
AE_OK
);
}
}
...
...
drivers/acpi/pci_bind.c
浏览文件 @
cece9014
...
@@ -281,7 +281,7 @@ int acpi_pci_unbind(struct acpi_device *device)
...
@@ -281,7 +281,7 @@ int acpi_pci_unbind(struct acpi_device *device)
if
(
!
device
||
!
device
->
parent
)
if
(
!
device
||
!
device
->
parent
)
return
-
EINVAL
;
return
-
EINVAL
;
pathname
=
(
char
*
)
kmalloc
(
ACPI_PATHNAME_MAX
,
GFP_KERNEL
);
pathname
=
kmalloc
(
ACPI_PATHNAME_MAX
,
GFP_KERNEL
);
if
(
!
pathname
)
if
(
!
pathname
)
return
-
ENOMEM
;
return
-
ENOMEM
;
memset
(
pathname
,
0
,
ACPI_PATHNAME_MAX
);
memset
(
pathname
,
0
,
ACPI_PATHNAME_MAX
);
...
@@ -332,7 +332,7 @@ acpi_pci_bind_root(struct acpi_device *device,
...
@@ -332,7 +332,7 @@ acpi_pci_bind_root(struct acpi_device *device,
struct
acpi_buffer
buffer
=
{
0
,
NULL
};
struct
acpi_buffer
buffer
=
{
0
,
NULL
};
pathname
=
(
char
*
)
kmalloc
(
ACPI_PATHNAME_MAX
,
GFP_KERNEL
);
pathname
=
kmalloc
(
ACPI_PATHNAME_MAX
,
GFP_KERNEL
);
if
(
!
pathname
)
if
(
!
pathname
)
return
-
ENOMEM
;
return
-
ENOMEM
;
memset
(
pathname
,
0
,
ACPI_PATHNAME_MAX
);
memset
(
pathname
,
0
,
ACPI_PATHNAME_MAX
);
...
...
drivers/acpi/pci_irq.c
浏览文件 @
cece9014
...
@@ -161,7 +161,7 @@ int acpi_pci_irq_add_prt(acpi_handle handle, int segment, int bus)
...
@@ -161,7 +161,7 @@ int acpi_pci_irq_add_prt(acpi_handle handle, int segment, int bus)
static
int
first_time
=
1
;
static
int
first_time
=
1
;
pathname
=
(
char
*
)
kmalloc
(
ACPI_PATHNAME_MAX
,
GFP_KERNEL
);
pathname
=
kmalloc
(
ACPI_PATHNAME_MAX
,
GFP_KERNEL
);
if
(
!
pathname
)
if
(
!
pathname
)
return
-
ENOMEM
;
return
-
ENOMEM
;
memset
(
pathname
,
0
,
ACPI_PATHNAME_MAX
);
memset
(
pathname
,
0
,
ACPI_PATHNAME_MAX
);
...
...
drivers/acpi/pci_link.c
浏览文件 @
cece9014
...
@@ -103,7 +103,7 @@ DEFINE_MUTEX(acpi_link_lock);
...
@@ -103,7 +103,7 @@ DEFINE_MUTEX(acpi_link_lock);
static
acpi_status
static
acpi_status
acpi_pci_link_check_possible
(
struct
acpi_resource
*
resource
,
void
*
context
)
acpi_pci_link_check_possible
(
struct
acpi_resource
*
resource
,
void
*
context
)
{
{
struct
acpi_pci_link
*
link
=
(
struct
acpi_pci_link
*
)
context
;
struct
acpi_pci_link
*
link
=
context
;
u32
i
=
0
;
u32
i
=
0
;
...
@@ -613,7 +613,7 @@ acpi_pci_link_allocate_irq(acpi_handle handle,
...
@@ -613,7 +613,7 @@ acpi_pci_link_allocate_irq(acpi_handle handle,
return
-
1
;
return
-
1
;
}
}
link
=
(
struct
acpi_pci_link
*
)
acpi_driver_data
(
device
);
link
=
acpi_driver_data
(
device
);
if
(
!
link
)
{
if
(
!
link
)
{
printk
(
KERN_ERR
PREFIX
"Invalid link context
\n
"
);
printk
(
KERN_ERR
PREFIX
"Invalid link context
\n
"
);
return
-
1
;
return
-
1
;
...
@@ -668,7 +668,7 @@ int acpi_pci_link_free_irq(acpi_handle handle)
...
@@ -668,7 +668,7 @@ int acpi_pci_link_free_irq(acpi_handle handle)
return
-
1
;
return
-
1
;
}
}
link
=
(
struct
acpi_pci_link
*
)
acpi_driver_data
(
device
);
link
=
acpi_driver_data
(
device
);
if
(
!
link
)
{
if
(
!
link
)
{
printk
(
KERN_ERR
PREFIX
"Invalid link context
\n
"
);
printk
(
KERN_ERR
PREFIX
"Invalid link context
\n
"
);
return
-
1
;
return
-
1
;
...
@@ -808,7 +808,7 @@ static int acpi_pci_link_remove(struct acpi_device *device, int type)
...
@@ -808,7 +808,7 @@ static int acpi_pci_link_remove(struct acpi_device *device, int type)
if
(
!
device
||
!
acpi_driver_data
(
device
))
if
(
!
device
||
!
acpi_driver_data
(
device
))
return
-
EINVAL
;
return
-
EINVAL
;
link
=
(
struct
acpi_pci_link
*
)
acpi_driver_data
(
device
);
link
=
acpi_driver_data
(
device
);
mutex_lock
(
&
acpi_link_lock
);
mutex_lock
(
&
acpi_link_lock
);
list_del
(
&
link
->
node
);
list_del
(
&
link
->
node
);
...
...
drivers/acpi/pci_root.c
浏览文件 @
cece9014
...
@@ -119,7 +119,7 @@ EXPORT_SYMBOL(acpi_pci_unregister_driver);
...
@@ -119,7 +119,7 @@ EXPORT_SYMBOL(acpi_pci_unregister_driver);
static
acpi_status
static
acpi_status
get_root_bridge_busnr_callback
(
struct
acpi_resource
*
resource
,
void
*
data
)
get_root_bridge_busnr_callback
(
struct
acpi_resource
*
resource
,
void
*
data
)
{
{
int
*
busnr
=
(
int
*
)
data
;
int
*
busnr
=
data
;
struct
acpi_resource_address64
address
;
struct
acpi_resource_address64
address
;
if
(
resource
->
type
!=
ACPI_RESOURCE_TYPE_ADDRESS16
&&
if
(
resource
->
type
!=
ACPI_RESOURCE_TYPE_ADDRESS16
&&
...
@@ -331,7 +331,7 @@ static int acpi_pci_root_remove(struct acpi_device *device, int type)
...
@@ -331,7 +331,7 @@ static int acpi_pci_root_remove(struct acpi_device *device, int type)
if
(
!
device
||
!
acpi_driver_data
(
device
))
if
(
!
device
||
!
acpi_driver_data
(
device
))
return
-
EINVAL
;
return
-
EINVAL
;
root
=
(
struct
acpi_pci_root
*
)
acpi_driver_data
(
device
);
root
=
acpi_driver_data
(
device
);
kfree
(
root
);
kfree
(
root
);
...
...
drivers/acpi/power.c
浏览文件 @
cece9014
...
@@ -108,7 +108,7 @@ acpi_power_get_context(acpi_handle handle,
...
@@ -108,7 +108,7 @@ acpi_power_get_context(acpi_handle handle,
return
result
;
return
result
;
}
}
*
resource
=
(
struct
acpi_power_resource
*
)
acpi_driver_data
(
device
);
*
resource
=
acpi_driver_data
(
device
);
if
(
!
resource
)
if
(
!
resource
)
return
-
ENODEV
;
return
-
ENODEV
;
...
@@ -442,7 +442,7 @@ static int acpi_power_seq_show(struct seq_file *seq, void *offset)
...
@@ -442,7 +442,7 @@ static int acpi_power_seq_show(struct seq_file *seq, void *offset)
struct
acpi_power_resource
*
resource
=
NULL
;
struct
acpi_power_resource
*
resource
=
NULL
;
resource
=
(
struct
acpi_power_resource
*
)
seq
->
private
;
resource
=
seq
->
private
;
if
(
!
resource
)
if
(
!
resource
)
goto
end
;
goto
end
;
...
@@ -590,7 +590,7 @@ static int acpi_power_remove(struct acpi_device *device, int type)
...
@@ -590,7 +590,7 @@ static int acpi_power_remove(struct acpi_device *device, int type)
if
(
!
device
||
!
acpi_driver_data
(
device
))
if
(
!
device
||
!
acpi_driver_data
(
device
))
return
-
EINVAL
;
return
-
EINVAL
;
resource
=
(
struct
acpi_power_resource
*
)
acpi_driver_data
(
device
);
resource
=
acpi_driver_data
(
device
);
acpi_power_remove_fs
(
device
);
acpi_power_remove_fs
(
device
);
...
...
drivers/acpi/processor_core.c
浏览文件 @
cece9014
...
@@ -277,7 +277,7 @@ static struct proc_dir_entry *acpi_processor_dir = NULL;
...
@@ -277,7 +277,7 @@ static struct proc_dir_entry *acpi_processor_dir = NULL;
static
int
acpi_processor_info_seq_show
(
struct
seq_file
*
seq
,
void
*
offset
)
static
int
acpi_processor_info_seq_show
(
struct
seq_file
*
seq
,
void
*
offset
)
{
{
struct
acpi_processor
*
pr
=
(
struct
acpi_processor
*
)
seq
->
private
;
struct
acpi_processor
*
pr
=
seq
->
private
;
if
(
!
pr
)
if
(
!
pr
)
...
@@ -542,12 +542,12 @@ static int __cpuinit acpi_processor_start(struct acpi_device *device)
...
@@ -542,12 +542,12 @@ static int __cpuinit acpi_processor_start(struct acpi_device *device)
* Don't trust it blindly
* Don't trust it blindly
*/
*/
if
(
processor_device_array
[
pr
->
id
]
!=
NULL
&&
if
(
processor_device_array
[
pr
->
id
]
!=
NULL
&&
processor_device_array
[
pr
->
id
]
!=
(
void
*
)
device
)
{
processor_device_array
[
pr
->
id
]
!=
device
)
{
printk
(
KERN_WARNING
"BIOS reported wrong ACPI id"
printk
(
KERN_WARNING
"BIOS reported wrong ACPI id"
"for the processor
\n
"
);
"for the processor
\n
"
);
return
-
ENODEV
;
return
-
ENODEV
;
}
}
processor_device_array
[
pr
->
id
]
=
(
void
*
)
device
;
processor_device_array
[
pr
->
id
]
=
device
;
processors
[
pr
->
id
]
=
pr
;
processors
[
pr
->
id
]
=
pr
;
...
@@ -578,7 +578,7 @@ static int __cpuinit acpi_processor_start(struct acpi_device *device)
...
@@ -578,7 +578,7 @@ static int __cpuinit acpi_processor_start(struct acpi_device *device)
static
void
acpi_processor_notify
(
acpi_handle
handle
,
u32
event
,
void
*
data
)
static
void
acpi_processor_notify
(
acpi_handle
handle
,
u32
event
,
void
*
data
)
{
{
struct
acpi_processor
*
pr
=
(
struct
acpi_processor
*
)
data
;
struct
acpi_processor
*
pr
=
data
;
struct
acpi_device
*
device
=
NULL
;
struct
acpi_device
*
device
=
NULL
;
...
@@ -637,7 +637,7 @@ static int acpi_processor_remove(struct acpi_device *device, int type)
...
@@ -637,7 +637,7 @@ static int acpi_processor_remove(struct acpi_device *device, int type)
if
(
!
device
||
!
acpi_driver_data
(
device
))
if
(
!
device
||
!
acpi_driver_data
(
device
))
return
-
EINVAL
;
return
-
EINVAL
;
pr
=
(
struct
acpi_processor
*
)
acpi_driver_data
(
device
);
pr
=
acpi_driver_data
(
device
);
if
(
pr
->
id
>=
NR_CPUS
)
{
if
(
pr
->
id
>=
NR_CPUS
)
{
kfree
(
pr
);
kfree
(
pr
);
...
...
drivers/acpi/processor_idle.c
浏览文件 @
cece9014
...
@@ -673,7 +673,7 @@ static int acpi_processor_get_power_info_cst(struct acpi_processor *pr)
...
@@ -673,7 +673,7 @@ static int acpi_processor_get_power_info_cst(struct acpi_processor *pr)
return
-
ENODEV
;
return
-
ENODEV
;
}
}
cst
=
(
union
acpi_object
*
)
buffer
.
pointer
;
cst
=
buffer
.
pointer
;
/* There must be at least 2 elements */
/* There must be at least 2 elements */
if
(
!
cst
||
(
cst
->
type
!=
ACPI_TYPE_PACKAGE
)
||
cst
->
package
.
count
<
2
)
{
if
(
!
cst
||
(
cst
->
type
!=
ACPI_TYPE_PACKAGE
)
||
cst
->
package
.
count
<
2
)
{
...
@@ -702,14 +702,14 @@ static int acpi_processor_get_power_info_cst(struct acpi_processor *pr)
...
@@ -702,14 +702,14 @@ static int acpi_processor_get_power_info_cst(struct acpi_processor *pr)
memset
(
&
cx
,
0
,
sizeof
(
cx
));
memset
(
&
cx
,
0
,
sizeof
(
cx
));
element
=
(
union
acpi_object
*
)
&
(
cst
->
package
.
elements
[
i
]);
element
=
&
(
cst
->
package
.
elements
[
i
]);
if
(
element
->
type
!=
ACPI_TYPE_PACKAGE
)
if
(
element
->
type
!=
ACPI_TYPE_PACKAGE
)
continue
;
continue
;
if
(
element
->
package
.
count
!=
4
)
if
(
element
->
package
.
count
!=
4
)
continue
;
continue
;
obj
=
(
union
acpi_object
*
)
&
(
element
->
package
.
elements
[
0
]);
obj
=
&
(
element
->
package
.
elements
[
0
]);
if
(
obj
->
type
!=
ACPI_TYPE_BUFFER
)
if
(
obj
->
type
!=
ACPI_TYPE_BUFFER
)
continue
;
continue
;
...
@@ -721,7 +721,7 @@ static int acpi_processor_get_power_info_cst(struct acpi_processor *pr)
...
@@ -721,7 +721,7 @@ static int acpi_processor_get_power_info_cst(struct acpi_processor *pr)
continue
;
continue
;
/* There should be an easy way to extract an integer... */
/* There should be an easy way to extract an integer... */
obj
=
(
union
acpi_object
*
)
&
(
element
->
package
.
elements
[
1
]);
obj
=
&
(
element
->
package
.
elements
[
1
]);
if
(
obj
->
type
!=
ACPI_TYPE_INTEGER
)
if
(
obj
->
type
!=
ACPI_TYPE_INTEGER
)
continue
;
continue
;
...
@@ -754,13 +754,13 @@ static int acpi_processor_get_power_info_cst(struct acpi_processor *pr)
...
@@ -754,13 +754,13 @@ static int acpi_processor_get_power_info_cst(struct acpi_processor *pr)
}
}
}
}
obj
=
(
union
acpi_object
*
)
&
(
element
->
package
.
elements
[
2
]);
obj
=
&
(
element
->
package
.
elements
[
2
]);
if
(
obj
->
type
!=
ACPI_TYPE_INTEGER
)
if
(
obj
->
type
!=
ACPI_TYPE_INTEGER
)
continue
;
continue
;
cx
.
latency
=
obj
->
integer
.
value
;
cx
.
latency
=
obj
->
integer
.
value
;
obj
=
(
union
acpi_object
*
)
&
(
element
->
package
.
elements
[
3
]);
obj
=
&
(
element
->
package
.
elements
[
3
]);
if
(
obj
->
type
!=
ACPI_TYPE_INTEGER
)
if
(
obj
->
type
!=
ACPI_TYPE_INTEGER
)
continue
;
continue
;
...
@@ -1029,7 +1029,7 @@ int acpi_processor_cst_has_changed(struct acpi_processor *pr)
...
@@ -1029,7 +1029,7 @@ int acpi_processor_cst_has_changed(struct acpi_processor *pr)
static
int
acpi_processor_power_seq_show
(
struct
seq_file
*
seq
,
void
*
offset
)
static
int
acpi_processor_power_seq_show
(
struct
seq_file
*
seq
,
void
*
offset
)
{
{
struct
acpi_processor
*
pr
=
(
struct
acpi_processor
*
)
seq
->
private
;
struct
acpi_processor
*
pr
=
seq
->
private
;
unsigned
int
i
;
unsigned
int
i
;
...
...
drivers/acpi/processor_perflib.c
浏览文件 @
cece9014
...
@@ -236,7 +236,7 @@ static int acpi_processor_get_performance_states(struct acpi_processor *pr)
...
@@ -236,7 +236,7 @@ static int acpi_processor_get_performance_states(struct acpi_processor *pr)
return
-
ENODEV
;
return
-
ENODEV
;
}
}
pss
=
(
union
acpi_object
*
)
buffer
.
pointer
;
pss
=
buffer
.
pointer
;
if
(
!
pss
||
(
pss
->
type
!=
ACPI_TYPE_PACKAGE
))
{
if
(
!
pss
||
(
pss
->
type
!=
ACPI_TYPE_PACKAGE
))
{
printk
(
KERN_ERR
PREFIX
"Invalid _PSS data
\n
"
);
printk
(
KERN_ERR
PREFIX
"Invalid _PSS data
\n
"
);
result
=
-
EFAULT
;
result
=
-
EFAULT
;
...
@@ -410,7 +410,7 @@ static struct file_operations acpi_processor_perf_fops = {
...
@@ -410,7 +410,7 @@ static struct file_operations acpi_processor_perf_fops = {
static
int
acpi_processor_perf_seq_show
(
struct
seq_file
*
seq
,
void
*
offset
)
static
int
acpi_processor_perf_seq_show
(
struct
seq_file
*
seq
,
void
*
offset
)
{
{
struct
acpi_processor
*
pr
=
(
struct
acpi_processor
*
)
seq
->
private
;
struct
acpi_processor
*
pr
=
seq
->
private
;
int
i
;
int
i
;
...
@@ -451,8 +451,8 @@ acpi_processor_write_performance(struct file *file,
...
@@ -451,8 +451,8 @@ acpi_processor_write_performance(struct file *file,
size_t
count
,
loff_t
*
data
)
size_t
count
,
loff_t
*
data
)
{
{
int
result
=
0
;
int
result
=
0
;
struct
seq_file
*
m
=
(
struct
seq_file
*
)
file
->
private_data
;
struct
seq_file
*
m
=
file
->
private_data
;
struct
acpi_processor
*
pr
=
(
struct
acpi_processor
*
)
m
->
private
;
struct
acpi_processor
*
pr
=
m
->
private
;
struct
acpi_processor_performance
*
perf
;
struct
acpi_processor_performance
*
perf
;
char
state_string
[
12
]
=
{
'\0'
};
char
state_string
[
12
]
=
{
'\0'
};
unsigned
int
new_state
=
0
;
unsigned
int
new_state
=
0
;
...
@@ -551,7 +551,7 @@ static int acpi_processor_get_psd(struct acpi_processor *pr)
...
@@ -551,7 +551,7 @@ static int acpi_processor_get_psd(struct acpi_processor *pr)
return
-
ENODEV
;
return
-
ENODEV
;
}
}
psd
=
(
union
acpi_object
*
)
buffer
.
pointer
;
psd
=
buffer
.
pointer
;
if
(
!
psd
||
(
psd
->
type
!=
ACPI_TYPE_PACKAGE
))
{
if
(
!
psd
||
(
psd
->
type
!=
ACPI_TYPE_PACKAGE
))
{
ACPI_DEBUG_PRINT
((
ACPI_DB_ERROR
,
"Invalid _PSD data
\n
"
));
ACPI_DEBUG_PRINT
((
ACPI_DB_ERROR
,
"Invalid _PSD data
\n
"
));
result
=
-
EFAULT
;
result
=
-
EFAULT
;
...
...
drivers/acpi/processor_thermal.c
浏览文件 @
cece9014
...
@@ -208,7 +208,7 @@ int acpi_processor_set_thermal_limit(acpi_handle handle, int type)
...
@@ -208,7 +208,7 @@ int acpi_processor_set_thermal_limit(acpi_handle handle, int type)
if
(
result
)
if
(
result
)
return
result
;
return
result
;
pr
=
(
struct
acpi_processor
*
)
acpi_driver_data
(
device
);
pr
=
acpi_driver_data
(
device
);
if
(
!
pr
)
if
(
!
pr
)
return
-
ENODEV
;
return
-
ENODEV
;
...
@@ -348,8 +348,8 @@ static ssize_t acpi_processor_write_limit(struct file * file,
...
@@ -348,8 +348,8 @@ static ssize_t acpi_processor_write_limit(struct file * file,
size_t
count
,
loff_t
*
data
)
size_t
count
,
loff_t
*
data
)
{
{
int
result
=
0
;
int
result
=
0
;
struct
seq_file
*
m
=
(
struct
seq_file
*
)
file
->
private_data
;
struct
seq_file
*
m
=
file
->
private_data
;
struct
acpi_processor
*
pr
=
(
struct
acpi_processor
*
)
m
->
private
;
struct
acpi_processor
*
pr
=
m
->
private
;
char
limit_string
[
25
]
=
{
'\0'
};
char
limit_string
[
25
]
=
{
'\0'
};
int
px
=
0
;
int
px
=
0
;
int
tx
=
0
;
int
tx
=
0
;
...
...
drivers/acpi/processor_throttling.c
浏览文件 @
cece9014
...
@@ -259,7 +259,7 @@ int acpi_processor_get_throttling_info(struct acpi_processor *pr)
...
@@ -259,7 +259,7 @@ int acpi_processor_get_throttling_info(struct acpi_processor *pr)
static
int
acpi_processor_throttling_seq_show
(
struct
seq_file
*
seq
,
static
int
acpi_processor_throttling_seq_show
(
struct
seq_file
*
seq
,
void
*
offset
)
void
*
offset
)
{
{
struct
acpi_processor
*
pr
=
(
struct
acpi_processor
*
)
seq
->
private
;
struct
acpi_processor
*
pr
=
seq
->
private
;
int
i
=
0
;
int
i
=
0
;
int
result
=
0
;
int
result
=
0
;
...
@@ -307,8 +307,8 @@ static ssize_t acpi_processor_write_throttling(struct file * file,
...
@@ -307,8 +307,8 @@ static ssize_t acpi_processor_write_throttling(struct file * file,
size_t
count
,
loff_t
*
data
)
size_t
count
,
loff_t
*
data
)
{
{
int
result
=
0
;
int
result
=
0
;
struct
seq_file
*
m
=
(
struct
seq_file
*
)
file
->
private_data
;
struct
seq_file
*
m
=
file
->
private_data
;
struct
acpi_processor
*
pr
=
(
struct
acpi_processor
*
)
m
->
private
;
struct
acpi_processor
*
pr
=
m
->
private
;
char
state_string
[
12
]
=
{
'\0'
};
char
state_string
[
12
]
=
{
'\0'
};
...
...
drivers/acpi/sbs.c
浏览文件 @
cece9014
...
@@ -923,7 +923,7 @@ static struct proc_dir_entry *acpi_battery_dir = NULL;
...
@@ -923,7 +923,7 @@ static struct proc_dir_entry *acpi_battery_dir = NULL;
static
int
acpi_battery_read_info
(
struct
seq_file
*
seq
,
void
*
offset
)
static
int
acpi_battery_read_info
(
struct
seq_file
*
seq
,
void
*
offset
)
{
{
struct
acpi_battery
*
battery
=
(
struct
acpi_battery
*
)
seq
->
private
;
struct
acpi_battery
*
battery
=
seq
->
private
;
int
cscale
;
int
cscale
;
int
result
=
0
;
int
result
=
0
;
...
@@ -1076,7 +1076,7 @@ static int acpi_battery_state_open_fs(struct inode *inode, struct file *file)
...
@@ -1076,7 +1076,7 @@ static int acpi_battery_state_open_fs(struct inode *inode, struct file *file)
static
int
acpi_battery_read_alarm
(
struct
seq_file
*
seq
,
void
*
offset
)
static
int
acpi_battery_read_alarm
(
struct
seq_file
*
seq
,
void
*
offset
)
{
{
struct
acpi_battery
*
battery
=
(
struct
acpi_battery
*
)
seq
->
private
;
struct
acpi_battery
*
battery
=
seq
->
private
;
int
result
=
0
;
int
result
=
0
;
int
cscale
;
int
cscale
;
...
@@ -1125,8 +1125,8 @@ static ssize_t
...
@@ -1125,8 +1125,8 @@ static ssize_t
acpi_battery_write_alarm
(
struct
file
*
file
,
const
char
__user
*
buffer
,
acpi_battery_write_alarm
(
struct
file
*
file
,
const
char
__user
*
buffer
,
size_t
count
,
loff_t
*
ppos
)
size_t
count
,
loff_t
*
ppos
)
{
{
struct
seq_file
*
seq
=
(
struct
seq_file
*
)
file
->
private_data
;
struct
seq_file
*
seq
=
file
->
private_data
;
struct
acpi_battery
*
battery
=
(
struct
acpi_battery
*
)
seq
->
private
;
struct
acpi_battery
*
battery
=
seq
->
private
;
char
alarm_string
[
12
]
=
{
'\0'
};
char
alarm_string
[
12
]
=
{
'\0'
};
int
result
,
old_alarm
,
new_alarm
;
int
result
,
old_alarm
,
new_alarm
;
...
@@ -1160,14 +1160,14 @@ acpi_battery_write_alarm(struct file *file, const char __user * buffer,
...
@@ -1160,14 +1160,14 @@ acpi_battery_write_alarm(struct file *file, const char __user * buffer,
if
(
result
)
{
if
(
result
)
{
ACPI_DEBUG_PRINT
((
ACPI_DB_ERROR
,
ACPI_DEBUG_PRINT
((
ACPI_DB_ERROR
,
"acpi_battery_set_alarm() failed
\n
"
));
"acpi_battery_set_alarm() failed
\n
"
));
(
void
)
acpi_battery_set_alarm
(
battery
,
old_alarm
);
acpi_battery_set_alarm
(
battery
,
old_alarm
);
goto
end
;
goto
end
;
}
}
result
=
acpi_battery_get_alarm
(
battery
);
result
=
acpi_battery_get_alarm
(
battery
);
if
(
result
)
{
if
(
result
)
{
ACPI_DEBUG_PRINT
((
ACPI_DB_ERROR
,
ACPI_DEBUG_PRINT
((
ACPI_DB_ERROR
,
"acpi_battery_get_alarm() failed
\n
"
));
"acpi_battery_get_alarm() failed
\n
"
));
(
void
)
acpi_battery_set_alarm
(
battery
,
old_alarm
);
acpi_battery_set_alarm
(
battery
,
old_alarm
);
goto
end
;
goto
end
;
}
}
...
@@ -1217,7 +1217,7 @@ static struct proc_dir_entry *acpi_ac_dir = NULL;
...
@@ -1217,7 +1217,7 @@ static struct proc_dir_entry *acpi_ac_dir = NULL;
static
int
acpi_ac_read_state
(
struct
seq_file
*
seq
,
void
*
offset
)
static
int
acpi_ac_read_state
(
struct
seq_file
*
seq
,
void
*
offset
)
{
{
struct
acpi_sbs
*
sbs
=
(
struct
acpi_sbs
*
)
seq
->
private
;
struct
acpi_sbs
*
sbs
=
seq
->
private
;
int
result
;
int
result
;
if
(
sbs
->
zombie
)
{
if
(
sbs
->
zombie
)
{
...
@@ -1302,7 +1302,7 @@ static int acpi_battery_add(struct acpi_sbs *sbs, int id)
...
@@ -1302,7 +1302,7 @@ static int acpi_battery_add(struct acpi_sbs *sbs, int id)
battery
->
init_state
=
1
;
battery
->
init_state
=
1
;
}
}
(
void
)
sprintf
(
dir_name
,
ACPI_BATTERY_DIR_NAME
,
id
);
sprintf
(
dir_name
,
ACPI_BATTERY_DIR_NAME
,
id
);
result
=
acpi_sbs_generic_add_fs
(
&
battery
->
battery_entry
,
result
=
acpi_sbs_generic_add_fs
(
&
battery
->
battery_entry
,
acpi_battery_dir
,
acpi_battery_dir
,
...
@@ -1485,7 +1485,7 @@ static int acpi_sbs_update_run(struct acpi_sbs *sbs, int data_type)
...
@@ -1485,7 +1485,7 @@ static int acpi_sbs_update_run(struct acpi_sbs *sbs, int data_type)
}
}
if
(
old_battery_present
!=
new_battery_present
)
{
if
(
old_battery_present
!=
new_battery_present
)
{
(
void
)
sprintf
(
dir_name
,
ACPI_BATTERY_DIR_NAME
,
id
);
sprintf
(
dir_name
,
ACPI_BATTERY_DIR_NAME
,
id
);
result
=
acpi_sbs_generate_event
(
sbs
->
device
,
result
=
acpi_sbs_generate_event
(
sbs
->
device
,
ACPI_SBS_BATTERY_NOTIFY_STATUS
,
ACPI_SBS_BATTERY_NOTIFY_STATUS
,
new_battery_present
,
new_battery_present
,
...
@@ -1498,7 +1498,7 @@ static int acpi_sbs_update_run(struct acpi_sbs *sbs, int data_type)
...
@@ -1498,7 +1498,7 @@ static int acpi_sbs_update_run(struct acpi_sbs *sbs, int data_type)
}
}
}
}
if
(
old_remaining_capacity
!=
battery
->
state
.
remaining_capacity
)
{
if
(
old_remaining_capacity
!=
battery
->
state
.
remaining_capacity
)
{
(
void
)
sprintf
(
dir_name
,
ACPI_BATTERY_DIR_NAME
,
id
);
sprintf
(
dir_name
,
ACPI_BATTERY_DIR_NAME
,
id
);
result
=
acpi_sbs_generate_event
(
sbs
->
device
,
result
=
acpi_sbs_generate_event
(
sbs
->
device
,
ACPI_SBS_BATTERY_NOTIFY_STATUS
,
ACPI_SBS_BATTERY_NOTIFY_STATUS
,
new_battery_present
,
new_battery_present
,
...
@@ -1659,7 +1659,7 @@ static int acpi_sbs_add(struct acpi_device *device)
...
@@ -1659,7 +1659,7 @@ static int acpi_sbs_add(struct acpi_device *device)
init_timer
(
&
sbs
->
update_timer
);
init_timer
(
&
sbs
->
update_timer
);
if
(
update_mode
==
QUEUE_UPDATE_MODE
)
{
if
(
update_mode
==
QUEUE_UPDATE_MODE
)
{
status
=
acpi_os_execute
(
OSL_GPE_HANDLER
,
status
=
acpi_os_execute
(
OSL_GPE_HANDLER
,
acpi_sbs_update_queue
,
(
void
*
)
sbs
);
acpi_sbs_update_queue
,
sbs
);
if
(
status
!=
AE_OK
)
{
if
(
status
!=
AE_OK
)
{
ACPI_DEBUG_PRINT
((
ACPI_DB_ERROR
,
ACPI_DEBUG_PRINT
((
ACPI_DB_ERROR
,
"acpi_os_execute() failed
\n
"
));
"acpi_os_execute() failed
\n
"
));
...
@@ -1685,7 +1685,7 @@ static int acpi_sbs_add(struct acpi_device *device)
...
@@ -1685,7 +1685,7 @@ static int acpi_sbs_add(struct acpi_device *device)
int
acpi_sbs_remove
(
struct
acpi_device
*
device
,
int
type
)
int
acpi_sbs_remove
(
struct
acpi_device
*
device
,
int
type
)
{
{
struct
acpi_sbs
*
sbs
=
NULL
;
struct
acpi_sbs
*
sbs
;
int
id
;
int
id
;
if
(
!
device
)
{
if
(
!
device
)
{
...
...
drivers/acpi/tables.c
浏览文件 @
cece9014
...
@@ -228,7 +228,7 @@ void acpi_table_print_madt_entry(acpi_table_entry_header * header)
...
@@ -228,7 +228,7 @@ void acpi_table_print_madt_entry(acpi_table_entry_header * header)
static
int
static
int
acpi_table_compute_checksum
(
void
*
table_pointer
,
unsigned
long
length
)
acpi_table_compute_checksum
(
void
*
table_pointer
,
unsigned
long
length
)
{
{
u8
*
p
=
(
u8
*
)
table_pointer
;
u8
*
p
=
table_pointer
;
unsigned
long
remains
=
length
;
unsigned
long
remains
=
length
;
unsigned
long
sum
=
0
;
unsigned
long
sum
=
0
;
...
...
drivers/acpi/thermal.c
浏览文件 @
cece9014
...
@@ -663,7 +663,7 @@ static void acpi_thermal_run(unsigned long data)
...
@@ -663,7 +663,7 @@ static void acpi_thermal_run(unsigned long data)
static
void
acpi_thermal_check
(
void
*
data
)
static
void
acpi_thermal_check
(
void
*
data
)
{
{
int
result
=
0
;
int
result
=
0
;
struct
acpi_thermal
*
tz
=
(
struct
acpi_thermal
*
)
data
;
struct
acpi_thermal
*
tz
=
data
;
unsigned
long
sleep_time
=
0
;
unsigned
long
sleep_time
=
0
;
int
i
=
0
;
int
i
=
0
;
struct
acpi_thermal_state
state
;
struct
acpi_thermal_state
state
;
...
@@ -778,7 +778,7 @@ static struct proc_dir_entry *acpi_thermal_dir;
...
@@ -778,7 +778,7 @@ static struct proc_dir_entry *acpi_thermal_dir;
static
int
acpi_thermal_state_seq_show
(
struct
seq_file
*
seq
,
void
*
offset
)
static
int
acpi_thermal_state_seq_show
(
struct
seq_file
*
seq
,
void
*
offset
)
{
{
struct
acpi_thermal
*
tz
=
(
struct
acpi_thermal
*
)
seq
->
private
;
struct
acpi_thermal
*
tz
=
seq
->
private
;
if
(
!
tz
)
if
(
!
tz
)
...
@@ -813,7 +813,7 @@ static int acpi_thermal_state_open_fs(struct inode *inode, struct file *file)
...
@@ -813,7 +813,7 @@ static int acpi_thermal_state_open_fs(struct inode *inode, struct file *file)
static
int
acpi_thermal_temp_seq_show
(
struct
seq_file
*
seq
,
void
*
offset
)
static
int
acpi_thermal_temp_seq_show
(
struct
seq_file
*
seq
,
void
*
offset
)
{
{
int
result
=
0
;
int
result
=
0
;
struct
acpi_thermal
*
tz
=
(
struct
acpi_thermal
*
)
seq
->
private
;
struct
acpi_thermal
*
tz
=
seq
->
private
;
if
(
!
tz
)
if
(
!
tz
)
...
@@ -837,7 +837,7 @@ static int acpi_thermal_temp_open_fs(struct inode *inode, struct file *file)
...
@@ -837,7 +837,7 @@ static int acpi_thermal_temp_open_fs(struct inode *inode, struct file *file)
static
int
acpi_thermal_trip_seq_show
(
struct
seq_file
*
seq
,
void
*
offset
)
static
int
acpi_thermal_trip_seq_show
(
struct
seq_file
*
seq
,
void
*
offset
)
{
{
struct
acpi_thermal
*
tz
=
(
struct
acpi_thermal
*
)
seq
->
private
;
struct
acpi_thermal
*
tz
=
seq
->
private
;
int
i
=
0
;
int
i
=
0
;
int
j
=
0
;
int
j
=
0
;
...
@@ -893,8 +893,8 @@ acpi_thermal_write_trip_points(struct file *file,
...
@@ -893,8 +893,8 @@ acpi_thermal_write_trip_points(struct file *file,
const
char
__user
*
buffer
,
const
char
__user
*
buffer
,
size_t
count
,
loff_t
*
ppos
)
size_t
count
,
loff_t
*
ppos
)
{
{
struct
seq_file
*
m
=
(
struct
seq_file
*
)
file
->
private_data
;
struct
seq_file
*
m
=
file
->
private_data
;
struct
acpi_thermal
*
tz
=
(
struct
acpi_thermal
*
)
m
->
private
;
struct
acpi_thermal
*
tz
=
m
->
private
;
char
*
limit_string
;
char
*
limit_string
;
int
num
,
critical
,
hot
,
passive
;
int
num
,
critical
,
hot
,
passive
;
...
@@ -953,7 +953,7 @@ acpi_thermal_write_trip_points(struct file *file,
...
@@ -953,7 +953,7 @@ acpi_thermal_write_trip_points(struct file *file,
static
int
acpi_thermal_cooling_seq_show
(
struct
seq_file
*
seq
,
void
*
offset
)
static
int
acpi_thermal_cooling_seq_show
(
struct
seq_file
*
seq
,
void
*
offset
)
{
{
struct
acpi_thermal
*
tz
=
(
struct
acpi_thermal
*
)
seq
->
private
;
struct
acpi_thermal
*
tz
=
seq
->
private
;
if
(
!
tz
)
if
(
!
tz
)
...
@@ -984,8 +984,8 @@ acpi_thermal_write_cooling_mode(struct file *file,
...
@@ -984,8 +984,8 @@ acpi_thermal_write_cooling_mode(struct file *file,
const
char
__user
*
buffer
,
const
char
__user
*
buffer
,
size_t
count
,
loff_t
*
ppos
)
size_t
count
,
loff_t
*
ppos
)
{
{
struct
seq_file
*
m
=
(
struct
seq_file
*
)
file
->
private_data
;
struct
seq_file
*
m
=
file
->
private_data
;
struct
acpi_thermal
*
tz
=
(
struct
acpi_thermal
*
)
m
->
private
;
struct
acpi_thermal
*
tz
=
m
->
private
;
int
result
=
0
;
int
result
=
0
;
char
mode_string
[
12
]
=
{
'\0'
};
char
mode_string
[
12
]
=
{
'\0'
};
...
@@ -1014,7 +1014,7 @@ acpi_thermal_write_cooling_mode(struct file *file,
...
@@ -1014,7 +1014,7 @@ acpi_thermal_write_cooling_mode(struct file *file,
static
int
acpi_thermal_polling_seq_show
(
struct
seq_file
*
seq
,
void
*
offset
)
static
int
acpi_thermal_polling_seq_show
(
struct
seq_file
*
seq
,
void
*
offset
)
{
{
struct
acpi_thermal
*
tz
=
(
struct
acpi_thermal
*
)
seq
->
private
;
struct
acpi_thermal
*
tz
=
seq
->
private
;
if
(
!
tz
)
if
(
!
tz
)
...
@@ -1043,8 +1043,8 @@ acpi_thermal_write_polling(struct file *file,
...
@@ -1043,8 +1043,8 @@ acpi_thermal_write_polling(struct file *file,
const
char
__user
*
buffer
,
const
char
__user
*
buffer
,
size_t
count
,
loff_t
*
ppos
)
size_t
count
,
loff_t
*
ppos
)
{
{
struct
seq_file
*
m
=
(
struct
seq_file
*
)
file
->
private_data
;
struct
seq_file
*
m
=
file
->
private_data
;
struct
acpi_thermal
*
tz
=
(
struct
acpi_thermal
*
)
m
->
private
;
struct
acpi_thermal
*
tz
=
m
->
private
;
int
result
=
0
;
int
result
=
0
;
char
polling_string
[
12
]
=
{
'\0'
};
char
polling_string
[
12
]
=
{
'\0'
};
int
seconds
=
0
;
int
seconds
=
0
;
...
@@ -1170,7 +1170,7 @@ static int acpi_thermal_remove_fs(struct acpi_device *device)
...
@@ -1170,7 +1170,7 @@ static int acpi_thermal_remove_fs(struct acpi_device *device)
static
void
acpi_thermal_notify
(
acpi_handle
handle
,
u32
event
,
void
*
data
)
static
void
acpi_thermal_notify
(
acpi_handle
handle
,
u32
event
,
void
*
data
)
{
{
struct
acpi_thermal
*
tz
=
(
struct
acpi_thermal
*
)
data
;
struct
acpi_thermal
*
tz
=
data
;
struct
acpi_device
*
device
=
NULL
;
struct
acpi_device
*
device
=
NULL
;
...
@@ -1324,7 +1324,7 @@ static int acpi_thermal_remove(struct acpi_device *device, int type)
...
@@ -1324,7 +1324,7 @@ static int acpi_thermal_remove(struct acpi_device *device, int type)
if
(
!
device
||
!
acpi_driver_data
(
device
))
if
(
!
device
||
!
acpi_driver_data
(
device
))
return
-
EINVAL
;
return
-
EINVAL
;
tz
=
(
struct
acpi_thermal
*
)
acpi_driver_data
(
device
);
tz
=
acpi_driver_data
(
device
);
/* avoid timer adding new defer task */
/* avoid timer adding new defer task */
tz
->
zombie
=
1
;
tz
->
zombie
=
1
;
...
@@ -1364,7 +1364,7 @@ static int acpi_thermal_resume(struct acpi_device *device, int state)
...
@@ -1364,7 +1364,7 @@ static int acpi_thermal_resume(struct acpi_device *device, int state)
if
(
!
device
||
!
acpi_driver_data
(
device
))
if
(
!
device
||
!
acpi_driver_data
(
device
))
return
-
EINVAL
;
return
-
EINVAL
;
tz
=
(
struct
acpi_thermal
*
)
acpi_driver_data
(
device
);
tz
=
acpi_driver_data
(
device
);
acpi_thermal_get_temperature
(
tz
);
acpi_thermal_get_temperature
(
tz
);
...
...
drivers/acpi/utils.c
浏览文件 @
cece9014
...
@@ -83,7 +83,7 @@ acpi_extract_package(union acpi_object *package,
...
@@ -83,7 +83,7 @@ acpi_extract_package(union acpi_object *package,
return
AE_BAD_DATA
;
return
AE_BAD_DATA
;
}
}
format_string
=
(
char
*
)
format
->
pointer
;
format_string
=
format
->
pointer
;
/*
/*
* Calculate size_required.
* Calculate size_required.
...
@@ -361,7 +361,7 @@ acpi_evaluate_reference(acpi_handle handle,
...
@@ -361,7 +361,7 @@ acpi_evaluate_reference(acpi_handle handle,
if
(
ACPI_FAILURE
(
status
))
if
(
ACPI_FAILURE
(
status
))
goto
end
;
goto
end
;
package
=
(
union
acpi_object
*
)
buffer
.
pointer
;
package
=
buffer
.
pointer
;
if
((
buffer
.
length
==
0
)
||
!
package
)
{
if
((
buffer
.
length
==
0
)
||
!
package
)
{
printk
(
KERN_ERR
PREFIX
"No return object (len %X ptr %p)
\n
"
,
printk
(
KERN_ERR
PREFIX
"No return object (len %X ptr %p)
\n
"
,
...
...
drivers/acpi/video.c
浏览文件 @
cece9014
...
@@ -386,7 +386,7 @@ acpi_video_device_EDID(struct acpi_video_device *device,
...
@@ -386,7 +386,7 @@ acpi_video_device_EDID(struct acpi_video_device *device,
if
(
ACPI_FAILURE
(
status
))
if
(
ACPI_FAILURE
(
status
))
return
-
ENODEV
;
return
-
ENODEV
;
obj
=
(
union
acpi_object
*
)
buffer
.
pointer
;
obj
=
buffer
.
pointer
;
if
(
obj
&&
obj
->
type
==
ACPI_TYPE_BUFFER
)
if
(
obj
&&
obj
->
type
==
ACPI_TYPE_BUFFER
)
*
edid
=
obj
;
*
edid
=
obj
;
...
@@ -654,8 +654,7 @@ static struct proc_dir_entry *acpi_video_dir;
...
@@ -654,8 +654,7 @@ static struct proc_dir_entry *acpi_video_dir;
static
int
acpi_video_device_info_seq_show
(
struct
seq_file
*
seq
,
void
*
offset
)
static
int
acpi_video_device_info_seq_show
(
struct
seq_file
*
seq
,
void
*
offset
)
{
{
struct
acpi_video_device
*
dev
=
struct
acpi_video_device
*
dev
=
seq
->
private
;
(
struct
acpi_video_device
*
)
seq
->
private
;
if
(
!
dev
)
if
(
!
dev
)
...
@@ -688,8 +687,7 @@ acpi_video_device_info_open_fs(struct inode *inode, struct file *file)
...
@@ -688,8 +687,7 @@ acpi_video_device_info_open_fs(struct inode *inode, struct file *file)
static
int
acpi_video_device_state_seq_show
(
struct
seq_file
*
seq
,
void
*
offset
)
static
int
acpi_video_device_state_seq_show
(
struct
seq_file
*
seq
,
void
*
offset
)
{
{
int
status
;
int
status
;
struct
acpi_video_device
*
dev
=
struct
acpi_video_device
*
dev
=
seq
->
private
;
(
struct
acpi_video_device
*
)
seq
->
private
;
unsigned
long
state
;
unsigned
long
state
;
...
@@ -727,8 +725,8 @@ acpi_video_device_write_state(struct file *file,
...
@@ -727,8 +725,8 @@ acpi_video_device_write_state(struct file *file,
size_t
count
,
loff_t
*
data
)
size_t
count
,
loff_t
*
data
)
{
{
int
status
;
int
status
;
struct
seq_file
*
m
=
(
struct
seq_file
*
)
file
->
private_data
;
struct
seq_file
*
m
=
file
->
private_data
;
struct
acpi_video_device
*
dev
=
(
struct
acpi_video_device
*
)
m
->
private
;
struct
acpi_video_device
*
dev
=
m
->
private
;
char
str
[
12
]
=
{
0
};
char
str
[
12
]
=
{
0
};
u32
state
=
0
;
u32
state
=
0
;
...
@@ -754,8 +752,7 @@ acpi_video_device_write_state(struct file *file,
...
@@ -754,8 +752,7 @@ acpi_video_device_write_state(struct file *file,
static
int
static
int
acpi_video_device_brightness_seq_show
(
struct
seq_file
*
seq
,
void
*
offset
)
acpi_video_device_brightness_seq_show
(
struct
seq_file
*
seq
,
void
*
offset
)
{
{
struct
acpi_video_device
*
dev
=
struct
acpi_video_device
*
dev
=
seq
->
private
;
(
struct
acpi_video_device
*
)
seq
->
private
;
int
i
;
int
i
;
...
@@ -784,8 +781,8 @@ acpi_video_device_write_brightness(struct file *file,
...
@@ -784,8 +781,8 @@ acpi_video_device_write_brightness(struct file *file,
const
char
__user
*
buffer
,
const
char
__user
*
buffer
,
size_t
count
,
loff_t
*
data
)
size_t
count
,
loff_t
*
data
)
{
{
struct
seq_file
*
m
=
(
struct
seq_file
*
)
file
->
private_data
;
struct
seq_file
*
m
=
file
->
private_data
;
struct
acpi_video_device
*
dev
=
(
struct
acpi_video_device
*
)
m
->
private
;
struct
acpi_video_device
*
dev
=
m
->
private
;
char
str
[
4
]
=
{
0
};
char
str
[
4
]
=
{
0
};
unsigned
int
level
=
0
;
unsigned
int
level
=
0
;
int
i
;
int
i
;
...
@@ -817,8 +814,7 @@ acpi_video_device_write_brightness(struct file *file,
...
@@ -817,8 +814,7 @@ acpi_video_device_write_brightness(struct file *file,
static
int
acpi_video_device_EDID_seq_show
(
struct
seq_file
*
seq
,
void
*
offset
)
static
int
acpi_video_device_EDID_seq_show
(
struct
seq_file
*
seq
,
void
*
offset
)
{
{
struct
acpi_video_device
*
dev
=
struct
acpi_video_device
*
dev
=
seq
->
private
;
(
struct
acpi_video_device
*
)
seq
->
private
;
int
status
;
int
status
;
int
i
;
int
i
;
union
acpi_object
*
edid
=
NULL
;
union
acpi_object
*
edid
=
NULL
;
...
@@ -866,7 +862,7 @@ static int acpi_video_device_add_fs(struct acpi_device *device)
...
@@ -866,7 +862,7 @@ static int acpi_video_device_add_fs(struct acpi_device *device)
if
(
!
device
)
if
(
!
device
)
return
-
ENODEV
;
return
-
ENODEV
;
vid_dev
=
(
struct
acpi_video_device
*
)
acpi_driver_data
(
device
);
vid_dev
=
acpi_driver_data
(
device
);
if
(
!
vid_dev
)
if
(
!
vid_dev
)
return
-
ENODEV
;
return
-
ENODEV
;
...
@@ -931,7 +927,7 @@ static int acpi_video_device_remove_fs(struct acpi_device *device)
...
@@ -931,7 +927,7 @@ static int acpi_video_device_remove_fs(struct acpi_device *device)
{
{
struct
acpi_video_device
*
vid_dev
;
struct
acpi_video_device
*
vid_dev
;
vid_dev
=
(
struct
acpi_video_device
*
)
acpi_driver_data
(
device
);
vid_dev
=
acpi_driver_data
(
device
);
if
(
!
vid_dev
||
!
vid_dev
->
video
||
!
vid_dev
->
video
->
dir
)
if
(
!
vid_dev
||
!
vid_dev
->
video
||
!
vid_dev
->
video
->
dir
)
return
-
ENODEV
;
return
-
ENODEV
;
...
@@ -950,7 +946,7 @@ static int acpi_video_device_remove_fs(struct acpi_device *device)
...
@@ -950,7 +946,7 @@ static int acpi_video_device_remove_fs(struct acpi_device *device)
/* video bus */
/* video bus */
static
int
acpi_video_bus_info_seq_show
(
struct
seq_file
*
seq
,
void
*
offset
)
static
int
acpi_video_bus_info_seq_show
(
struct
seq_file
*
seq
,
void
*
offset
)
{
{
struct
acpi_video_bus
*
video
=
(
struct
acpi_video_bus
*
)
seq
->
private
;
struct
acpi_video_bus
*
video
=
seq
->
private
;
if
(
!
video
)
if
(
!
video
)
...
@@ -975,7 +971,7 @@ static int acpi_video_bus_info_open_fs(struct inode *inode, struct file *file)
...
@@ -975,7 +971,7 @@ static int acpi_video_bus_info_open_fs(struct inode *inode, struct file *file)
static
int
acpi_video_bus_ROM_seq_show
(
struct
seq_file
*
seq
,
void
*
offset
)
static
int
acpi_video_bus_ROM_seq_show
(
struct
seq_file
*
seq
,
void
*
offset
)
{
{
struct
acpi_video_bus
*
video
=
(
struct
acpi_video_bus
*
)
seq
->
private
;
struct
acpi_video_bus
*
video
=
seq
->
private
;
if
(
!
video
)
if
(
!
video
)
...
@@ -995,7 +991,7 @@ static int acpi_video_bus_ROM_open_fs(struct inode *inode, struct file *file)
...
@@ -995,7 +991,7 @@ static int acpi_video_bus_ROM_open_fs(struct inode *inode, struct file *file)
static
int
acpi_video_bus_POST_info_seq_show
(
struct
seq_file
*
seq
,
void
*
offset
)
static
int
acpi_video_bus_POST_info_seq_show
(
struct
seq_file
*
seq
,
void
*
offset
)
{
{
struct
acpi_video_bus
*
video
=
(
struct
acpi_video_bus
*
)
seq
->
private
;
struct
acpi_video_bus
*
video
=
seq
->
private
;
unsigned
long
options
;
unsigned
long
options
;
int
status
;
int
status
;
...
@@ -1033,7 +1029,7 @@ acpi_video_bus_POST_info_open_fs(struct inode *inode, struct file *file)
...
@@ -1033,7 +1029,7 @@ acpi_video_bus_POST_info_open_fs(struct inode *inode, struct file *file)
static
int
acpi_video_bus_POST_seq_show
(
struct
seq_file
*
seq
,
void
*
offset
)
static
int
acpi_video_bus_POST_seq_show
(
struct
seq_file
*
seq
,
void
*
offset
)
{
{
struct
acpi_video_bus
*
video
=
(
struct
acpi_video_bus
*
)
seq
->
private
;
struct
acpi_video_bus
*
video
=
seq
->
private
;
int
status
;
int
status
;
unsigned
long
id
;
unsigned
long
id
;
...
@@ -1054,7 +1050,7 @@ static int acpi_video_bus_POST_seq_show(struct seq_file *seq, void *offset)
...
@@ -1054,7 +1050,7 @@ static int acpi_video_bus_POST_seq_show(struct seq_file *seq, void *offset)
static
int
acpi_video_bus_DOS_seq_show
(
struct
seq_file
*
seq
,
void
*
offset
)
static
int
acpi_video_bus_DOS_seq_show
(
struct
seq_file
*
seq
,
void
*
offset
)
{
{
struct
acpi_video_bus
*
video
=
(
struct
acpi_video_bus
*
)
seq
->
private
;
struct
acpi_video_bus
*
video
=
seq
->
private
;
seq_printf
(
seq
,
"DOS setting: <%d>
\n
"
,
video
->
dos_setting
);
seq_printf
(
seq
,
"DOS setting: <%d>
\n
"
,
video
->
dos_setting
);
...
@@ -1079,8 +1075,8 @@ acpi_video_bus_write_POST(struct file *file,
...
@@ -1079,8 +1075,8 @@ acpi_video_bus_write_POST(struct file *file,
size_t
count
,
loff_t
*
data
)
size_t
count
,
loff_t
*
data
)
{
{
int
status
;
int
status
;
struct
seq_file
*
m
=
(
struct
seq_file
*
)
file
->
private_data
;
struct
seq_file
*
m
=
file
->
private_data
;
struct
acpi_video_bus
*
video
=
(
struct
acpi_video_bus
*
)
m
->
private
;
struct
acpi_video_bus
*
video
=
m
->
private
;
char
str
[
12
]
=
{
0
};
char
str
[
12
]
=
{
0
};
unsigned
long
opt
,
options
;
unsigned
long
opt
,
options
;
...
@@ -1119,8 +1115,8 @@ acpi_video_bus_write_DOS(struct file *file,
...
@@ -1119,8 +1115,8 @@ acpi_video_bus_write_DOS(struct file *file,
size_t
count
,
loff_t
*
data
)
size_t
count
,
loff_t
*
data
)
{
{
int
status
;
int
status
;
struct
seq_file
*
m
=
(
struct
seq_file
*
)
file
->
private_data
;
struct
seq_file
*
m
=
file
->
private_data
;
struct
acpi_video_bus
*
video
=
(
struct
acpi_video_bus
*
)
m
->
private
;
struct
acpi_video_bus
*
video
=
m
->
private
;
char
str
[
12
]
=
{
0
};
char
str
[
12
]
=
{
0
};
unsigned
long
opt
;
unsigned
long
opt
;
...
@@ -1150,7 +1146,7 @@ static int acpi_video_bus_add_fs(struct acpi_device *device)
...
@@ -1150,7 +1146,7 @@ static int acpi_video_bus_add_fs(struct acpi_device *device)
struct
acpi_video_bus
*
video
;
struct
acpi_video_bus
*
video
;
video
=
(
struct
acpi_video_bus
*
)
acpi_driver_data
(
device
);
video
=
acpi_driver_data
(
device
);
if
(
!
acpi_device_dir
(
device
))
{
if
(
!
acpi_device_dir
(
device
))
{
acpi_device_dir
(
device
)
=
proc_mkdir
(
acpi_device_bid
(
device
),
acpi_device_dir
(
device
)
=
proc_mkdir
(
acpi_device_bid
(
device
),
...
@@ -1226,7 +1222,7 @@ static int acpi_video_bus_remove_fs(struct acpi_device *device)
...
@@ -1226,7 +1222,7 @@ static int acpi_video_bus_remove_fs(struct acpi_device *device)
struct
acpi_video_bus
*
video
;
struct
acpi_video_bus
*
video
;
video
=
(
struct
acpi_video_bus
*
)
acpi_driver_data
(
device
);
video
=
acpi_driver_data
(
device
);
if
(
acpi_device_dir
(
device
))
{
if
(
acpi_device_dir
(
device
))
{
remove_proc_entry
(
"info"
,
acpi_device_dir
(
device
));
remove_proc_entry
(
"info"
,
acpi_device_dir
(
device
));
...
@@ -1403,7 +1399,7 @@ static int acpi_video_device_enumerate(struct acpi_video_bus *video)
...
@@ -1403,7 +1399,7 @@ static int acpi_video_device_enumerate(struct acpi_video_bus *video)
return
status
;
return
status
;
}
}
dod
=
(
union
acpi_object
*
)
buffer
.
pointer
;
dod
=
buffer
.
pointer
;
if
(
!
dod
||
(
dod
->
type
!=
ACPI_TYPE_PACKAGE
))
{
if
(
!
dod
||
(
dod
->
type
!=
ACPI_TYPE_PACKAGE
))
{
ACPI_EXCEPTION
((
AE_INFO
,
status
,
"Invalid _DOD data"
));
ACPI_EXCEPTION
((
AE_INFO
,
status
,
"Invalid _DOD data"
));
status
=
-
EFAULT
;
status
=
-
EFAULT
;
...
@@ -1426,7 +1422,7 @@ static int acpi_video_device_enumerate(struct acpi_video_bus *video)
...
@@ -1426,7 +1422,7 @@ static int acpi_video_device_enumerate(struct acpi_video_bus *video)
count
=
0
;
count
=
0
;
for
(
i
=
0
;
i
<
dod
->
package
.
count
;
i
++
)
{
for
(
i
=
0
;
i
<
dod
->
package
.
count
;
i
++
)
{
obj
=
(
union
acpi_object
*
)
&
dod
->
package
.
elements
[
i
];
obj
=
&
dod
->
package
.
elements
[
i
];
if
(
obj
->
type
!=
ACPI_TYPE_INTEGER
)
{
if
(
obj
->
type
!=
ACPI_TYPE_INTEGER
)
{
printk
(
KERN_ERR
PREFIX
"Invalid _DOD data
\n
"
);
printk
(
KERN_ERR
PREFIX
"Invalid _DOD data
\n
"
);
...
@@ -1612,7 +1608,7 @@ static int acpi_video_bus_stop_devices(struct acpi_video_bus *video)
...
@@ -1612,7 +1608,7 @@ static int acpi_video_bus_stop_devices(struct acpi_video_bus *video)
static
void
acpi_video_bus_notify
(
acpi_handle
handle
,
u32
event
,
void
*
data
)
static
void
acpi_video_bus_notify
(
acpi_handle
handle
,
u32
event
,
void
*
data
)
{
{
struct
acpi_video_bus
*
video
=
(
struct
acpi_video_bus
*
)
data
;
struct
acpi_video_bus
*
video
=
data
;
struct
acpi_device
*
device
=
NULL
;
struct
acpi_device
*
device
=
NULL
;
printk
(
"video bus notify
\n
"
);
printk
(
"video bus notify
\n
"
);
...
@@ -1654,8 +1650,7 @@ static void acpi_video_bus_notify(acpi_handle handle, u32 event, void *data)
...
@@ -1654,8 +1650,7 @@ static void acpi_video_bus_notify(acpi_handle handle, u32 event, void *data)
static
void
acpi_video_device_notify
(
acpi_handle
handle
,
u32
event
,
void
*
data
)
static
void
acpi_video_device_notify
(
acpi_handle
handle
,
u32
event
,
void
*
data
)
{
{
struct
acpi_video_device
*
video_device
=
struct
acpi_video_device
*
video_device
=
data
;
(
struct
acpi_video_device
*
)
data
;
struct
acpi_device
*
device
=
NULL
;
struct
acpi_device
*
device
=
NULL
;
...
@@ -1757,7 +1752,7 @@ static int acpi_video_bus_remove(struct acpi_device *device, int type)
...
@@ -1757,7 +1752,7 @@ static int acpi_video_bus_remove(struct acpi_device *device, int type)
if
(
!
device
||
!
acpi_driver_data
(
device
))
if
(
!
device
||
!
acpi_driver_data
(
device
))
return
-
EINVAL
;
return
-
EINVAL
;
video
=
(
struct
acpi_video_bus
*
)
acpi_driver_data
(
device
);
video
=
acpi_driver_data
(
device
);
acpi_video_bus_stop_devices
(
video
);
acpi_video_bus_stop_devices
(
video
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录