Skip to content

Commit c80dc60

Browse files
author
Linus Torvalds
committed
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: ACPI: ACPI_DOCK: Initialize the atomic notifier list ACPI: acpi_os_allocate() fixes ACPI: SBS: fix initialization, sem2mutex ACPI: add 'const' to several ACPI file_operations ACPI: delete some defaults from ACPI Kconfig ACPI: "Device `[%s]' is not power manageable" make message debug only ACPI: ACPI_DOCK Kconfig Revert "Revert "ACPI: dock driver"" ACPI: acpi_os_get_thread_id() returns current ACPI: ACPICA 20060707
2 parents 90ca9a2 + 0466684 commit c80dc60

52 files changed

Lines changed: 1086 additions & 228 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎drivers/acpi/Kconfig‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,12 @@ config ACPI_FAN
132132
This driver adds support for ACPI fan devices, allowing user-mode
133133
applications to perform basic fan control (on, off, status).
134134

135+
config ACPI_DOCK
136+
tristate "Dock"
137+
depends on EXPERIMENTAL
138+
help
139+
This driver adds support for ACPI controlled docking stations
140+
135141
config ACPI_PROCESSOR
136142
tristate "Processor"
137143
default y
@@ -206,6 +212,7 @@ config ACPI_IBM
206212
config ACPI_IBM_DOCK
207213
bool "Legacy Docking Station Support"
208214
depends on ACPI_IBM
215+
depends on ACPI_DOCK=n
209216
default n
210217
---help---
211218
Allows the ibm_acpi driver to handle docking station events.

‎drivers/acpi/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ obj-$(CONFIG_ACPI_BATTERY) += battery.o
4242
obj-$(CONFIG_ACPI_BUTTON) += button.o
4343
obj-$(CONFIG_ACPI_EC) += ec.o
4444
obj-$(CONFIG_ACPI_FAN) += fan.o
45+
obj-$(CONFIG_ACPI_DOCK) += dock.o
4546
obj-$(CONFIG_ACPI_VIDEO) += video.o
4647
obj-$(CONFIG_ACPI_HOTKEY) += hotkey.o
4748
obj-y += pci_root.o pci_link.o pci_irq.o pci_bind.o

‎drivers/acpi/ac.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ struct acpi_ac {
7272
unsigned long state;
7373
};
7474

75-
static struct file_operations acpi_ac_fops = {
75+
static const struct file_operations acpi_ac_fops = {
7676
.open = acpi_ac_open_fs,
7777
.read = seq_read,
7878
.llseek = seq_lseek,

‎drivers/acpi/battery.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -557,23 +557,23 @@ static int acpi_battery_alarm_open_fs(struct inode *inode, struct file *file)
557557
return single_open(file, acpi_battery_read_alarm, PDE(inode)->data);
558558
}
559559

560-
static struct file_operations acpi_battery_info_ops = {
560+
static const struct file_operations acpi_battery_info_ops = {
561561
.open = acpi_battery_info_open_fs,
562562
.read = seq_read,
563563
.llseek = seq_lseek,
564564
.release = single_release,
565565
.owner = THIS_MODULE,
566566
};
567567

568-
static struct file_operations acpi_battery_state_ops = {
568+
static const struct file_operations acpi_battery_state_ops = {
569569
.open = acpi_battery_state_open_fs,
570570
.read = seq_read,
571571
.llseek = seq_lseek,
572572
.release = single_release,
573573
.owner = THIS_MODULE,
574574
};
575575

576-
static struct file_operations acpi_battery_alarm_ops = {
576+
static const struct file_operations acpi_battery_alarm_ops = {
577577
.open = acpi_battery_alarm_open_fs,
578578
.read = seq_read,
579579
.write = acpi_battery_write_alarm,

‎drivers/acpi/bus.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,8 @@ int acpi_bus_set_power(acpi_handle handle, int state)
192192
/* Make sure this is a valid target state */
193193

194194
if (!device->flags.power_manageable) {
195-
printk(KERN_DEBUG "Device `[%s]' is not power manageable",
196-
device->kobj.name);
195+
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device `[%s]' is not power manageable",
196+
device->kobj.name));
197197
return -ENODEV;
198198
}
199199
/*

‎drivers/acpi/button.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,14 @@ struct acpi_button {
8787
unsigned long pushed;
8888
};
8989

90-
static struct file_operations acpi_button_info_fops = {
90+
static const struct file_operations acpi_button_info_fops = {
9191
.open = acpi_button_info_open_fs,
9292
.read = seq_read,
9393
.llseek = seq_lseek,
9494
.release = single_release,
9595
};
9696

97-
static struct file_operations acpi_button_state_fops = {
97+
static const struct file_operations acpi_button_state_fops = {
9898
.open = acpi_button_state_open_fs,
9999
.read = seq_read,
100100
.llseek = seq_lseek,

‎drivers/acpi/cm_sbs.c‎

Lines changed: 14 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -39,50 +39,43 @@ ACPI_MODULE_NAME("cm_sbs")
3939
static struct proc_dir_entry *acpi_ac_dir;
4040
static struct proc_dir_entry *acpi_battery_dir;
4141

42-
static struct semaphore cm_sbs_sem;
42+
static DEFINE_MUTEX(cm_sbs_mutex);
4343

44-
static int lock_ac_dir_cnt = 0;
45-
static int lock_battery_dir_cnt = 0;
44+
static int lock_ac_dir_cnt;
45+
static int lock_battery_dir_cnt;
4646

4747
struct proc_dir_entry *acpi_lock_ac_dir(void)
4848
{
49-
50-
down(&cm_sbs_sem);
51-
if (!acpi_ac_dir) {
49+
mutex_lock(&cm_sbs_mutex);
50+
if (!acpi_ac_dir)
5251
acpi_ac_dir = proc_mkdir(ACPI_AC_CLASS, acpi_root_dir);
53-
}
5452
if (acpi_ac_dir) {
5553
lock_ac_dir_cnt++;
5654
} else {
5755
ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
5856
"Cannot create %s\n", ACPI_AC_CLASS));
5957
}
60-
up(&cm_sbs_sem);
58+
mutex_unlock(&cm_sbs_mutex);
6159
return acpi_ac_dir;
6260
}
63-
6461
EXPORT_SYMBOL(acpi_lock_ac_dir);
6562

6663
void acpi_unlock_ac_dir(struct proc_dir_entry *acpi_ac_dir_param)
6764
{
68-
69-
down(&cm_sbs_sem);
70-
if (acpi_ac_dir_param) {
65+
mutex_lock(&cm_sbs_mutex);
66+
if (acpi_ac_dir_param)
7167
lock_ac_dir_cnt--;
72-
}
7368
if (lock_ac_dir_cnt == 0 && acpi_ac_dir_param && acpi_ac_dir) {
7469
remove_proc_entry(ACPI_AC_CLASS, acpi_root_dir);
7570
acpi_ac_dir = 0;
7671
}
77-
up(&cm_sbs_sem);
72+
mutex_unlock(&cm_sbs_mutex);
7873
}
79-
8074
EXPORT_SYMBOL(acpi_unlock_ac_dir);
8175

8276
struct proc_dir_entry *acpi_lock_battery_dir(void)
8377
{
84-
85-
down(&cm_sbs_sem);
78+
mutex_lock(&cm_sbs_mutex);
8679
if (!acpi_battery_dir) {
8780
acpi_battery_dir =
8881
proc_mkdir(ACPI_BATTERY_CLASS, acpi_root_dir);
@@ -93,39 +86,28 @@ struct proc_dir_entry *acpi_lock_battery_dir(void)
9386
ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
9487
"Cannot create %s\n", ACPI_BATTERY_CLASS));
9588
}
96-
up(&cm_sbs_sem);
89+
mutex_unlock(&cm_sbs_mutex);
9790
return acpi_battery_dir;
9891
}
99-
10092
EXPORT_SYMBOL(acpi_lock_battery_dir);
10193

10294
void acpi_unlock_battery_dir(struct proc_dir_entry *acpi_battery_dir_param)
10395
{
104-
105-
down(&cm_sbs_sem);
106-
if (acpi_battery_dir_param) {
96+
mutex_lock(&cm_sbs_mutex);
97+
if (acpi_battery_dir_param)
10798
lock_battery_dir_cnt--;
108-
}
10999
if (lock_battery_dir_cnt == 0 && acpi_battery_dir_param
110100
&& acpi_battery_dir) {
111101
remove_proc_entry(ACPI_BATTERY_CLASS, acpi_root_dir);
112102
acpi_battery_dir = 0;
113103
}
114-
up(&cm_sbs_sem);
104+
mutex_unlock(&cm_sbs_mutex);
115105
return;
116106
}
117-
118107
EXPORT_SYMBOL(acpi_unlock_battery_dir);
119108

120109
static int __init acpi_cm_sbs_init(void)
121110
{
122-
123-
if (acpi_disabled)
124-
return 0;
125-
126-
init_MUTEX(&cm_sbs_sem);
127-
128111
return 0;
129112
}
130-
131113
subsys_initcall(acpi_cm_sbs_init);

‎drivers/acpi/dispatcher/dsinit.c‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -116,16 +116,6 @@ acpi_ds_init_one_object(acpi_handle obj_handle,
116116

117117
case ACPI_TYPE_METHOD:
118118

119-
/*
120-
* Set the execution data width (32 or 64) based upon the
121-
* revision number of the parent ACPI table.
122-
* TBD: This is really for possible future support of integer width
123-
* on a per-table basis. Currently, we just use a global for the width.
124-
*/
125-
if (info->table_desc->pointer->revision == 1) {
126-
node->flags |= ANOBJ_DATA_WIDTH_32;
127-
}
128-
129119
info->method_count++;
130120
break;
131121

‎drivers/acpi/dispatcher/dsmethod.c‎

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ acpi_ds_create_method_mutex(union acpi_operand_object *method_desc)
134134
union acpi_operand_object *mutex_desc;
135135
acpi_status status;
136136

137-
ACPI_FUNCTION_NAME(ds_create_method_mutex);
137+
ACPI_FUNCTION_TRACE(ds_create_method_mutex);
138138

139139
/* Create the new mutex object */
140140

@@ -493,7 +493,7 @@ acpi_ds_restart_control_method(struct acpi_walk_state *walk_state,
493493

494494
ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH,
495495
"****Restart [%4.4s] Op %p ReturnValueFromCallee %p\n",
496-
(char *)&walk_state->method_node->name,
496+
acpi_ut_get_node_name(walk_state->method_node),
497497
walk_state->method_call_op, return_desc));
498498

499499
ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH,
@@ -610,6 +610,7 @@ acpi_ds_terminate_control_method(union acpi_operand_object *method_desc,
610610

611611
acpi_os_release_mutex(method_desc->method.mutex->mutex.
612612
os_mutex);
613+
method_desc->method.mutex->mutex.owner_thread = NULL;
613614
}
614615
}
615616

@@ -620,27 +621,11 @@ acpi_ds_terminate_control_method(union acpi_operand_object *method_desc,
620621
*/
621622
method_node = walk_state->method_node;
622623

623-
/* Lock namespace for possible update */
624-
625-
status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE);
626-
if (ACPI_FAILURE(status)) {
627-
return_VOID;
628-
}
629-
630-
/*
631-
* Delete any namespace entries created immediately underneath
632-
* the method
633-
*/
634-
if (method_node && method_node->child) {
635-
acpi_ns_delete_namespace_subtree(method_node);
636-
}
637-
638624
/*
639-
* Delete any namespace entries created anywhere else within
625+
* Delete any namespace objects created anywhere within
640626
* the namespace by the execution of this method
641627
*/
642628
acpi_ns_delete_namespace_by_owner(method_desc->method.owner_id);
643-
status = acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
644629
}
645630

646631
/* Decrement the thread count on the method */

‎drivers/acpi/dispatcher/dswexec.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,10 +313,10 @@ acpi_ds_exec_begin_op(struct acpi_walk_state *walk_state,
313313
case AML_CLASS_EXECUTE:
314314
case AML_CLASS_CREATE:
315315
/*
316-
* Most operators with arguments.
316+
* Most operators with arguments (except create_xxx_field operators)
317317
* Start a new result/operand state
318318
*/
319-
if (walk_state->opcode != AML_CREATE_FIELD_OP) {
319+
if (walk_state->op_info->object_type != ACPI_TYPE_BUFFER_FIELD) {
320320
status = acpi_ds_result_stack_push(walk_state);
321321
}
322322
break;

0 commit comments

Comments
 (0)