aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/acpica')
-rw-r--r--drivers/acpi/acpica/acdispat.h11
-rw-r--r--drivers/acpi/acpica/acevents.h6
-rw-r--r--drivers/acpi/acpica/aclocal.h6
-rw-r--r--drivers/acpi/acpica/acparser.h3
-rw-r--r--drivers/acpi/acpica/acpredef.h11
-rw-r--r--drivers/acpi/acpica/dsopcode.c3
-rw-r--r--drivers/acpi/acpica/dsutils.c3
-rw-r--r--drivers/acpi/acpica/dswstate.c14
-rw-r--r--drivers/acpi/acpica/evgpe.c20
-rw-r--r--drivers/acpi/acpica/evgpeblk.c3
-rw-r--r--drivers/acpi/acpica/evgpeutil.c3
-rw-r--r--drivers/acpi/acpica/evrgnini.c3
-rw-r--r--drivers/acpi/acpica/evxfgpe.c9
-rw-r--r--drivers/acpi/acpica/exconvrt.c4
-rw-r--r--drivers/acpi/acpica/excreate.c3
-rw-r--r--drivers/acpi/acpica/exdump.c9
-rw-r--r--drivers/acpi/acpica/exfldio.c3
-rw-r--r--drivers/acpi/acpica/exnames.c6
-rw-r--r--drivers/acpi/acpica/exresop.c3
-rw-r--r--drivers/acpi/acpica/hwgpe.c3
-rw-r--r--drivers/acpi/acpica/hwtimer.c3
-rw-r--r--drivers/acpi/acpica/hwxfsleep.c12
-rw-r--r--drivers/acpi/acpica/nsaccess.c3
-rw-r--r--drivers/acpi/acpica/nsinit.c4
-rw-r--r--drivers/acpi/acpica/psopcode.c23
-rw-r--r--drivers/acpi/acpica/psparse.c5
-rw-r--r--drivers/acpi/acpica/rscalc.c3
27 files changed, 100 insertions, 79 deletions
diff --git a/drivers/acpi/acpica/acdispat.h b/drivers/acpi/acpica/acdispat.h
index 5935ba6707e2..ed33ebcdaebe 100644
--- a/drivers/acpi/acpica/acdispat.h
+++ b/drivers/acpi/acpica/acdispat.h
@@ -309,10 +309,13 @@ acpi_ds_obj_stack_push(void *object, struct acpi_walk_state *walk_state);
309acpi_status 309acpi_status
310acpi_ds_obj_stack_pop(u32 pop_count, struct acpi_walk_state *walk_state); 310acpi_ds_obj_stack_pop(u32 pop_count, struct acpi_walk_state *walk_state);
311 311
312struct acpi_walk_state *acpi_ds_create_walk_state(acpi_owner_id owner_id, union acpi_parse_object 312struct acpi_walk_state * acpi_ds_create_walk_state(acpi_owner_id owner_id,
313 *origin, union acpi_operand_object 313 union acpi_parse_object
314 *mth_desc, struct acpi_thread_state 314 *origin,
315 *thread); 315 union acpi_operand_object
316 *mth_desc,
317 struct acpi_thread_state
318 *thread);
316 319
317acpi_status 320acpi_status
318acpi_ds_init_aml_walk(struct acpi_walk_state *walk_state, 321acpi_ds_init_aml_walk(struct acpi_walk_state *walk_state,
diff --git a/drivers/acpi/acpica/acevents.h b/drivers/acpi/acpica/acevents.h
index c0a43b38c6a3..e975c6720448 100644
--- a/drivers/acpi/acpica/acevents.h
+++ b/drivers/acpi/acpica/acevents.h
@@ -84,9 +84,11 @@ acpi_ev_update_gpe_enable_mask(struct acpi_gpe_event_info *gpe_event_info);
84 84
85acpi_status acpi_ev_enable_gpe(struct acpi_gpe_event_info *gpe_event_info); 85acpi_status acpi_ev_enable_gpe(struct acpi_gpe_event_info *gpe_event_info);
86 86
87acpi_status acpi_ev_add_gpe_reference(struct acpi_gpe_event_info *gpe_event_info); 87acpi_status
88acpi_ev_add_gpe_reference(struct acpi_gpe_event_info *gpe_event_info);
88 89
89acpi_status acpi_ev_remove_gpe_reference(struct acpi_gpe_event_info *gpe_event_info); 90acpi_status
91acpi_ev_remove_gpe_reference(struct acpi_gpe_event_info *gpe_event_info);
90 92
91struct acpi_gpe_event_info *acpi_ev_get_gpe_event_info(acpi_handle gpe_device, 93struct acpi_gpe_event_info *acpi_ev_get_gpe_event_info(acpi_handle gpe_device,
92 u32 gpe_number); 94 u32 gpe_number);
diff --git a/drivers/acpi/acpica/aclocal.h b/drivers/acpi/acpica/aclocal.h
index 564f2abf5904..5b5be40a1997 100644
--- a/drivers/acpi/acpica/aclocal.h
+++ b/drivers/acpi/acpica/aclocal.h
@@ -486,8 +486,10 @@ struct acpi_gpe_device_info {
486 struct acpi_namespace_node *gpe_device; 486 struct acpi_namespace_node *gpe_device;
487}; 487};
488 488
489typedef acpi_status(*acpi_gpe_callback) (struct acpi_gpe_xrupt_info *gpe_xrupt_info, 489typedef acpi_status(*acpi_gpe_callback) (struct acpi_gpe_xrupt_info *
490 struct acpi_gpe_block_info *gpe_block, void *context); 490 gpe_xrupt_info,
491 struct acpi_gpe_block_info *gpe_block,
492 void *context);
491 493
492/* Information about each particular fixed event */ 494/* Information about each particular fixed event */
493 495
diff --git a/drivers/acpi/acpica/acparser.h b/drivers/acpi/acpica/acparser.h
index b725d780d34d..eefcf47a61a0 100644
--- a/drivers/acpi/acpica/acparser.h
+++ b/drivers/acpi/acpica/acparser.h
@@ -150,8 +150,7 @@ u8 acpi_ps_has_completed_scope(struct acpi_parse_state *parser_state);
150 150
151void 151void
152acpi_ps_pop_scope(struct acpi_parse_state *parser_state, 152acpi_ps_pop_scope(struct acpi_parse_state *parser_state,
153 union acpi_parse_object **op, 153 union acpi_parse_object **op, u32 *arg_list, u32 *arg_count);
154 u32 * arg_list, u32 * arg_count);
155 154
156acpi_status 155acpi_status
157acpi_ps_push_scope(struct acpi_parse_state *parser_state, 156acpi_ps_push_scope(struct acpi_parse_state *parser_state,
diff --git a/drivers/acpi/acpica/acpredef.h b/drivers/acpi/acpica/acpredef.h
index 3080c017f5ba..9dfa1c83bd4e 100644
--- a/drivers/acpi/acpica/acpredef.h
+++ b/drivers/acpi/acpica/acpredef.h
@@ -150,8 +150,7 @@ enum acpi_return_package_types {
150 * is saved here (rather than in a separate table) in order to minimize the 150 * is saved here (rather than in a separate table) in order to minimize the
151 * overall size of the stored data. 151 * overall size of the stored data.
152 */ 152 */
153static const union acpi_predefined_info predefined_names[] = 153static const union acpi_predefined_info predefined_names[] = {
154{
155 {{"_AC0", 0, ACPI_RTYPE_INTEGER}}, 154 {{"_AC0", 0, ACPI_RTYPE_INTEGER}},
156 {{"_AC1", 0, ACPI_RTYPE_INTEGER}}, 155 {{"_AC1", 0, ACPI_RTYPE_INTEGER}},
157 {{"_AC2", 0, ACPI_RTYPE_INTEGER}}, 156 {{"_AC2", 0, ACPI_RTYPE_INTEGER}},
@@ -538,7 +537,8 @@ static const union acpi_predefined_info predefined_names[] =
538 537
539 /* Acpi 1.0 defined _WAK with no return value. Later, it was changed to return a package */ 538 /* Acpi 1.0 defined _WAK with no return value. Later, it was changed to return a package */
540 539
541 {{"_WAK", 1, ACPI_RTYPE_NONE | ACPI_RTYPE_INTEGER | ACPI_RTYPE_PACKAGE}}, 540 {{"_WAK", 1,
541 ACPI_RTYPE_NONE | ACPI_RTYPE_INTEGER | ACPI_RTYPE_PACKAGE}},
542 {{{ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 2,0}, 0,0}}, /* Fixed-length (2 Int), but is optional */ 542 {{{ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 2,0}, 0,0}}, /* Fixed-length (2 Int), but is optional */
543 543
544 /* _WDG/_WED are MS extensions defined by "Windows Instrumentation" */ 544 /* _WDG/_WED are MS extensions defined by "Windows Instrumentation" */
@@ -551,11 +551,12 @@ static const union acpi_predefined_info predefined_names[] =
551}; 551};
552 552
553#if 0 553#if 0
554
554 /* This is an internally implemented control method, no need to check */ 555 /* This is an internally implemented control method, no need to check */
555 {{"_OSI", 1, ACPI_RTYPE_INTEGER}}, 556{ {
557"_OSI", 1, ACPI_RTYPE_INTEGER}},
556 558
557 /* TBD: */ 559 /* TBD: */
558
559 _PRT - currently ignore reversed entries. attempt to fix here? 560 _PRT - currently ignore reversed entries. attempt to fix here?
560 think about possibly fixing package elements like _BIF, etc. 561 think about possibly fixing package elements like _BIF, etc.
561#endif 562#endif
diff --git a/drivers/acpi/acpica/dsopcode.c b/drivers/acpi/acpica/dsopcode.c
index aa34d8984d34..0df024e5fb63 100644
--- a/drivers/acpi/acpica/dsopcode.c
+++ b/drivers/acpi/acpica/dsopcode.c
@@ -649,7 +649,8 @@ acpi_ds_eval_data_object_operands(struct acpi_walk_state *walk_state,
649 ((op->common.parent->common.aml_opcode != AML_PACKAGE_OP) && 649 ((op->common.parent->common.aml_opcode != AML_PACKAGE_OP) &&
650 (op->common.parent->common.aml_opcode != 650 (op->common.parent->common.aml_opcode !=
651 AML_VAR_PACKAGE_OP) 651 AML_VAR_PACKAGE_OP)
652 && (op->common.parent->common.aml_opcode != AML_NAME_OP))) { 652 && (op->common.parent->common.aml_opcode !=
653 AML_NAME_OP))) {
653 walk_state->result_obj = obj_desc; 654 walk_state->result_obj = obj_desc;
654 } 655 }
655 } 656 }
diff --git a/drivers/acpi/acpica/dsutils.c b/drivers/acpi/acpica/dsutils.c
index 73a5447475f5..4bbdd6c7a3d0 100644
--- a/drivers/acpi/acpica/dsutils.c
+++ b/drivers/acpi/acpica/dsutils.c
@@ -560,7 +560,8 @@ acpi_ds_create_operand(struct acpi_walk_state *walk_state,
560 * indicate this to the interpreter, set the 560 * indicate this to the interpreter, set the
561 * object to the root 561 * object to the root
562 */ 562 */
563 obj_desc = ACPI_CAST_PTR(union 563 obj_desc =
564 ACPI_CAST_PTR(union
564 acpi_operand_object, 565 acpi_operand_object,
565 acpi_gbl_root_node); 566 acpi_gbl_root_node);
566 status = AE_OK; 567 status = AE_OK;
diff --git a/drivers/acpi/acpica/dswstate.c b/drivers/acpi/acpica/dswstate.c
index d0e6555061e4..9bb7fa45e240 100644
--- a/drivers/acpi/acpica/dswstate.c
+++ b/drivers/acpi/acpica/dswstate.c
@@ -51,8 +51,9 @@
51ACPI_MODULE_NAME("dswstate") 51ACPI_MODULE_NAME("dswstate")
52 52
53 /* Local prototypes */ 53 /* Local prototypes */
54static acpi_status acpi_ds_result_stack_push(struct acpi_walk_state *ws); 54static acpi_status
55static acpi_status acpi_ds_result_stack_pop(struct acpi_walk_state *ws); 55acpi_ds_result_stack_push(struct acpi_walk_state *walk_state);
56static acpi_status acpi_ds_result_stack_pop(struct acpi_walk_state *walk_state);
56 57
57/******************************************************************************* 58/*******************************************************************************
58 * 59 *
@@ -536,9 +537,12 @@ struct acpi_walk_state *acpi_ds_pop_walk_state(struct acpi_thread_state *thread)
536 * 537 *
537 ******************************************************************************/ 538 ******************************************************************************/
538 539
539struct acpi_walk_state *acpi_ds_create_walk_state(acpi_owner_id owner_id, union acpi_parse_object 540struct acpi_walk_state *acpi_ds_create_walk_state(acpi_owner_id owner_id,
540 *origin, union acpi_operand_object 541 union acpi_parse_object
541 *method_desc, struct acpi_thread_state 542 *origin,
543 union acpi_operand_object
544 *method_desc,
545 struct acpi_thread_state
542 *thread) 546 *thread)
543{ 547{
544 struct acpi_walk_state *walk_state; 548 struct acpi_walk_state *walk_state;
diff --git a/drivers/acpi/acpica/evgpe.c b/drivers/acpi/acpica/evgpe.c
index ef0193d74b5d..36d120574423 100644
--- a/drivers/acpi/acpica/evgpe.c
+++ b/drivers/acpi/acpica/evgpe.c
@@ -89,7 +89,8 @@ acpi_ev_update_gpe_enable_mask(struct acpi_gpe_event_info *gpe_event_info)
89 /* Set the mask bit only if there are references to this GPE */ 89 /* Set the mask bit only if there are references to this GPE */
90 90
91 if (gpe_event_info->runtime_count) { 91 if (gpe_event_info->runtime_count) {
92 ACPI_SET_BIT(gpe_register_info->enable_for_run, (u8)register_bit); 92 ACPI_SET_BIT(gpe_register_info->enable_for_run,
93 (u8)register_bit);
93 } 94 }
94 95
95 return_ACPI_STATUS(AE_OK); 96 return_ACPI_STATUS(AE_OK);
@@ -106,8 +107,7 @@ acpi_ev_update_gpe_enable_mask(struct acpi_gpe_event_info *gpe_event_info)
106 * DESCRIPTION: Clear a GPE of stale events and enable it. 107 * DESCRIPTION: Clear a GPE of stale events and enable it.
107 * 108 *
108 ******************************************************************************/ 109 ******************************************************************************/
109acpi_status 110acpi_status acpi_ev_enable_gpe(struct acpi_gpe_event_info *gpe_event_info)
110acpi_ev_enable_gpe(struct acpi_gpe_event_info *gpe_event_info)
111{ 111{
112 acpi_status status; 112 acpi_status status;
113 113
@@ -131,8 +131,8 @@ acpi_ev_enable_gpe(struct acpi_gpe_event_info *gpe_event_info)
131 } 131 }
132 132
133 /* Enable the requested GPE */ 133 /* Enable the requested GPE */
134 status = acpi_hw_low_set_gpe(gpe_event_info, ACPI_GPE_ENABLE);
135 134
135 status = acpi_hw_low_set_gpe(gpe_event_info, ACPI_GPE_ENABLE);
136 return_ACPI_STATUS(status); 136 return_ACPI_STATUS(status);
137} 137}
138 138
@@ -150,7 +150,8 @@ acpi_ev_enable_gpe(struct acpi_gpe_event_info *gpe_event_info)
150 * 150 *
151 ******************************************************************************/ 151 ******************************************************************************/
152 152
153acpi_status acpi_ev_add_gpe_reference(struct acpi_gpe_event_info *gpe_event_info) 153acpi_status
154acpi_ev_add_gpe_reference(struct acpi_gpe_event_info *gpe_event_info)
154{ 155{
155 acpi_status status = AE_OK; 156 acpi_status status = AE_OK;
156 157
@@ -191,7 +192,8 @@ acpi_status acpi_ev_add_gpe_reference(struct acpi_gpe_event_info *gpe_event_info
191 * 192 *
192 ******************************************************************************/ 193 ******************************************************************************/
193 194
194acpi_status acpi_ev_remove_gpe_reference(struct acpi_gpe_event_info *gpe_event_info) 195acpi_status
196acpi_ev_remove_gpe_reference(struct acpi_gpe_event_info *gpe_event_info)
195{ 197{
196 acpi_status status = AE_OK; 198 acpi_status status = AE_OK;
197 199
@@ -208,7 +210,8 @@ acpi_status acpi_ev_remove_gpe_reference(struct acpi_gpe_event_info *gpe_event_i
208 210
209 status = acpi_ev_update_gpe_enable_mask(gpe_event_info); 211 status = acpi_ev_update_gpe_enable_mask(gpe_event_info);
210 if (ACPI_SUCCESS(status)) { 212 if (ACPI_SUCCESS(status)) {
211 status = acpi_hw_low_set_gpe(gpe_event_info, 213 status =
214 acpi_hw_low_set_gpe(gpe_event_info,
212 ACPI_GPE_DISABLE); 215 ACPI_GPE_DISABLE);
213 } 216 }
214 217
@@ -306,7 +309,8 @@ struct acpi_gpe_event_info *acpi_ev_get_gpe_event_info(acpi_handle gpe_device,
306 309
307 /* A Non-NULL gpe_device means this is a GPE Block Device */ 310 /* A Non-NULL gpe_device means this is a GPE Block Device */
308 311
309 obj_desc = acpi_ns_get_attached_object((struct acpi_namespace_node *) 312 obj_desc =
313 acpi_ns_get_attached_object((struct acpi_namespace_node *)
310 gpe_device); 314 gpe_device);
311 if (!obj_desc || !obj_desc->device.gpe_block) { 315 if (!obj_desc || !obj_desc->device.gpe_block) {
312 return (NULL); 316 return (NULL);
diff --git a/drivers/acpi/acpica/evgpeblk.c b/drivers/acpi/acpica/evgpeblk.c
index 8cf4c104c7b7..1571a61a7833 100644
--- a/drivers/acpi/acpica/evgpeblk.c
+++ b/drivers/acpi/acpica/evgpeblk.c
@@ -486,7 +486,8 @@ acpi_ev_initialize_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
486 if (ACPI_FAILURE(status)) { 486 if (ACPI_FAILURE(status)) {
487 ACPI_EXCEPTION((AE_INFO, status, 487 ACPI_EXCEPTION((AE_INFO, status,
488 "Could not enable GPE 0x%02X", 488 "Could not enable GPE 0x%02X",
489 gpe_index + gpe_block->block_base_number)); 489 gpe_index +
490 gpe_block->block_base_number));
490 continue; 491 continue;
491 } 492 }
492 493
diff --git a/drivers/acpi/acpica/evgpeutil.c b/drivers/acpi/acpica/evgpeutil.c
index cb50dd91bc18..228a0c3b1d49 100644
--- a/drivers/acpi/acpica/evgpeutil.c
+++ b/drivers/acpi/acpica/evgpeutil.c
@@ -374,7 +374,8 @@ acpi_ev_delete_gpe_handlers(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
374 gpe_event_info->dispatch.handler = NULL; 374 gpe_event_info->dispatch.handler = NULL;
375 gpe_event_info->flags &= 375 gpe_event_info->flags &=
376 ~ACPI_GPE_DISPATCH_MASK; 376 ~ACPI_GPE_DISPATCH_MASK;
377 } else if ((gpe_event_info-> 377 } else
378 if ((gpe_event_info->
378 flags & ACPI_GPE_DISPATCH_MASK) == 379 flags & ACPI_GPE_DISPATCH_MASK) ==
379 ACPI_GPE_DISPATCH_NOTIFY) { 380 ACPI_GPE_DISPATCH_NOTIFY) {
380 381
diff --git a/drivers/acpi/acpica/evrgnini.c b/drivers/acpi/acpica/evrgnini.c
index 6786f00042cd..1474241bfc7e 100644
--- a/drivers/acpi/acpica/evrgnini.c
+++ b/drivers/acpi/acpica/evrgnini.c
@@ -227,8 +227,7 @@ acpi_ev_pci_config_region_setup(acpi_handle handle,
227 227
228 /* Install a handler for this PCI root bridge */ 228 /* Install a handler for this PCI root bridge */
229 229
230 status = 230 status = acpi_install_address_space_handler((acpi_handle) pci_root_node, ACPI_ADR_SPACE_PCI_CONFIG, ACPI_DEFAULT_HANDLER, NULL, NULL);
231 acpi_install_address_space_handler((acpi_handle) pci_root_node, ACPI_ADR_SPACE_PCI_CONFIG, ACPI_DEFAULT_HANDLER, NULL, NULL);
232 if (ACPI_FAILURE(status)) { 231 if (ACPI_FAILURE(status)) {
233 if (status == AE_SAME_HANDLER) { 232 if (status == AE_SAME_HANDLER) {
234 /* 233 /*
diff --git a/drivers/acpi/acpica/evxfgpe.c b/drivers/acpi/acpica/evxfgpe.c
index 87c5f2332260..d36f99739376 100644
--- a/drivers/acpi/acpica/evxfgpe.c
+++ b/drivers/acpi/acpica/evxfgpe.c
@@ -221,7 +221,8 @@ acpi_setup_gpe_for_wake(acpi_handle wake_device,
221 if (wake_device == ACPI_ROOT_OBJECT) { 221 if (wake_device == ACPI_ROOT_OBJECT) {
222 device_node = acpi_gbl_root_node; 222 device_node = acpi_gbl_root_node;
223 } else { 223 } else {
224 device_node = ACPI_CAST_PTR(struct acpi_namespace_node, wake_device); 224 device_node =
225 ACPI_CAST_PTR(struct acpi_namespace_node, wake_device);
225 } 226 }
226 227
227 /* Validate WakeDevice is of type Device */ 228 /* Validate WakeDevice is of type Device */
@@ -324,7 +325,8 @@ ACPI_EXPORT_SYMBOL(acpi_setup_gpe_for_wake)
324 * 325 *
325 ******************************************************************************/ 326 ******************************************************************************/
326 327
327acpi_status acpi_set_gpe_wake_mask(acpi_handle gpe_device, u32 gpe_number, u8 action) 328acpi_status
329acpi_set_gpe_wake_mask(acpi_handle gpe_device, u32 gpe_number, u8 action)
328{ 330{
329 acpi_status status = AE_OK; 331 acpi_status status = AE_OK;
330 struct acpi_gpe_event_info *gpe_event_info; 332 struct acpi_gpe_event_info *gpe_event_info;
@@ -694,8 +696,7 @@ ACPI_EXPORT_SYMBOL(acpi_remove_gpe_block)
694 * the FADT-defined gpe blocks. Otherwise, the GPE block device. 696 * the FADT-defined gpe blocks. Otherwise, the GPE block device.
695 * 697 *
696 ******************************************************************************/ 698 ******************************************************************************/
697acpi_status 699acpi_status acpi_get_gpe_device(u32 index, acpi_handle * gpe_device)
698acpi_get_gpe_device(u32 index, acpi_handle *gpe_device)
699{ 700{
700 struct acpi_gpe_device_info info; 701 struct acpi_gpe_device_info info;
701 acpi_status status; 702 acpi_status status;
diff --git a/drivers/acpi/acpica/exconvrt.c b/drivers/acpi/acpica/exconvrt.c
index bfb062e4c4b4..4492a4e03022 100644
--- a/drivers/acpi/acpica/exconvrt.c
+++ b/drivers/acpi/acpica/exconvrt.c
@@ -516,8 +516,8 @@ acpi_ex_convert_to_string(union acpi_operand_object * obj_desc,
516 string_length--; 516 string_length--;
517 } 517 }
518 518
519 return_desc = acpi_ut_create_string_object((acpi_size) 519 return_desc =
520 string_length); 520 acpi_ut_create_string_object((acpi_size) string_length);
521 if (!return_desc) { 521 if (!return_desc) {
522 return_ACPI_STATUS(AE_NO_MEMORY); 522 return_ACPI_STATUS(AE_NO_MEMORY);
523 } 523 }
diff --git a/drivers/acpi/acpica/excreate.c b/drivers/acpi/acpica/excreate.c
index 691d4763102c..9f152701bc0f 100644
--- a/drivers/acpi/acpica/excreate.c
+++ b/drivers/acpi/acpica/excreate.c
@@ -243,8 +243,7 @@ acpi_status acpi_ex_create_mutex(struct acpi_walk_state *walk_state)
243 243
244 /* Init object and attach to NS node */ 244 /* Init object and attach to NS node */
245 245
246 obj_desc->mutex.sync_level = 246 obj_desc->mutex.sync_level = (u8)walk_state->operands[1]->integer.value;
247 (u8) walk_state->operands[1]->integer.value;
248 obj_desc->mutex.node = 247 obj_desc->mutex.node =
249 (struct acpi_namespace_node *)walk_state->operands[0]; 248 (struct acpi_namespace_node *)walk_state->operands[0];
250 249
diff --git a/drivers/acpi/acpica/exdump.c b/drivers/acpi/acpica/exdump.c
index 213c081776fc..40608b3e28f7 100644
--- a/drivers/acpi/acpica/exdump.c
+++ b/drivers/acpi/acpica/exdump.c
@@ -464,7 +464,8 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth)
464 464
465 ACPI_FUNCTION_NAME(ex_dump_operand) 465 ACPI_FUNCTION_NAME(ex_dump_operand)
466 466
467 if (!((ACPI_LV_EXEC & acpi_dbg_level) 467 if (!
468 ((ACPI_LV_EXEC & acpi_dbg_level)
468 && (_COMPONENT & acpi_dbg_layer))) { 469 && (_COMPONENT & acpi_dbg_layer))) {
469 return; 470 return;
470 } 471 }
@@ -810,7 +811,8 @@ void acpi_ex_dump_namespace_node(struct acpi_namespace_node *node, u32 flags)
810 ACPI_FUNCTION_ENTRY(); 811 ACPI_FUNCTION_ENTRY();
811 812
812 if (!flags) { 813 if (!flags) {
813 if (!((ACPI_LV_OBJECTS & acpi_dbg_level) 814 if (!
815 ((ACPI_LV_OBJECTS & acpi_dbg_level)
814 && (_COMPONENT & acpi_dbg_layer))) { 816 && (_COMPONENT & acpi_dbg_layer))) {
815 return; 817 return;
816 } 818 }
@@ -996,7 +998,8 @@ acpi_ex_dump_object_descriptor(union acpi_operand_object *obj_desc, u32 flags)
996 } 998 }
997 999
998 if (!flags) { 1000 if (!flags) {
999 if (!((ACPI_LV_OBJECTS & acpi_dbg_level) 1001 if (!
1002 ((ACPI_LV_OBJECTS & acpi_dbg_level)
1000 && (_COMPONENT & acpi_dbg_layer))) { 1003 && (_COMPONENT & acpi_dbg_layer))) {
1001 return_VOID; 1004 return_VOID;
1002 } 1005 }
diff --git a/drivers/acpi/acpica/exfldio.c b/drivers/acpi/acpica/exfldio.c
index a7784152ed30..419148a66e71 100644
--- a/drivers/acpi/acpica/exfldio.c
+++ b/drivers/acpi/acpica/exfldio.c
@@ -54,8 +54,7 @@ ACPI_MODULE_NAME("exfldio")
54/* Local prototypes */ 54/* Local prototypes */
55static acpi_status 55static acpi_status
56acpi_ex_field_datum_io(union acpi_operand_object *obj_desc, 56acpi_ex_field_datum_io(union acpi_operand_object *obj_desc,
57 u32 field_datum_byte_offset, 57 u32 field_datum_byte_offset, u64 *value, u32 read_write);
58 u64 *value, u32 read_write);
59 58
60static u8 59static u8
61acpi_ex_register_overflow(union acpi_operand_object *obj_desc, u64 value); 60acpi_ex_register_overflow(union acpi_operand_object *obj_desc, u64 value);
diff --git a/drivers/acpi/acpica/exnames.c b/drivers/acpi/acpica/exnames.c
index fcc75fa27d32..6d19bd42d297 100644
--- a/drivers/acpi/acpica/exnames.c
+++ b/drivers/acpi/acpica/exnames.c
@@ -53,8 +53,7 @@ ACPI_MODULE_NAME("exnames")
53/* Local prototypes */ 53/* Local prototypes */
54static char *acpi_ex_allocate_name_string(u32 prefix_count, u32 num_name_segs); 54static char *acpi_ex_allocate_name_string(u32 prefix_count, u32 num_name_segs);
55 55
56static acpi_status 56static acpi_status acpi_ex_name_segment(u8 **in_aml_address, char *name_string);
57acpi_ex_name_segment(u8 ** in_aml_address, char *name_string);
58 57
59/******************************************************************************* 58/*******************************************************************************
60 * 59 *
@@ -178,7 +177,8 @@ static acpi_status acpi_ex_name_segment(u8 ** in_aml_address, char *name_string)
178 177
179 ACPI_DEBUG_PRINT((ACPI_DB_LOAD, "Bytes from stream:\n")); 178 ACPI_DEBUG_PRINT((ACPI_DB_LOAD, "Bytes from stream:\n"));
180 179
181 for (index = 0; (index < ACPI_NAME_SIZE) 180 for (index = 0;
181 (index < ACPI_NAME_SIZE)
182 && (acpi_ut_valid_acpi_char(*aml_address, 0)); index++) { 182 && (acpi_ut_valid_acpi_char(*aml_address, 0)); index++) {
183 char_buf[index] = *aml_address++; 183 char_buf[index] = *aml_address++;
184 ACPI_DEBUG_PRINT((ACPI_DB_LOAD, "%c\n", char_buf[index])); 184 ACPI_DEBUG_PRINT((ACPI_DB_LOAD, "%c\n", char_buf[index]));
diff --git a/drivers/acpi/acpica/exresop.c b/drivers/acpi/acpica/exresop.c
index f232fbabdea8..17dc218cd392 100644
--- a/drivers/acpi/acpica/exresop.c
+++ b/drivers/acpi/acpica/exresop.c
@@ -337,7 +337,8 @@ acpi_ex_resolve_operands(u16 opcode,
337 if ((opcode == AML_STORE_OP) && 337 if ((opcode == AML_STORE_OP) &&
338 ((*stack_ptr)->common.type == 338 ((*stack_ptr)->common.type ==
339 ACPI_TYPE_LOCAL_REFERENCE) 339 ACPI_TYPE_LOCAL_REFERENCE)
340 && ((*stack_ptr)->reference.class == ACPI_REFCLASS_INDEX)) { 340 && ((*stack_ptr)->reference.class ==
341 ACPI_REFCLASS_INDEX)) {
341 goto next_operand; 342 goto next_operand;
342 } 343 }
343 break; 344 break;
diff --git a/drivers/acpi/acpica/hwgpe.c b/drivers/acpi/acpica/hwgpe.c
index db4076580e2b..3b3b5e45847c 100644
--- a/drivers/acpi/acpica/hwgpe.c
+++ b/drivers/acpi/acpica/hwgpe.c
@@ -339,7 +339,8 @@ acpi_hw_clear_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
339 339
340acpi_status 340acpi_status
341acpi_hw_enable_runtime_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info, 341acpi_hw_enable_runtime_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
342 struct acpi_gpe_block_info *gpe_block, void *context) 342 struct acpi_gpe_block_info * gpe_block,
343 void *context)
343{ 344{
344 u32 i; 345 u32 i;
345 acpi_status status; 346 acpi_status status;
diff --git a/drivers/acpi/acpica/hwtimer.c b/drivers/acpi/acpica/hwtimer.c
index b6411f16832f..438004a1dd85 100644
--- a/drivers/acpi/acpica/hwtimer.c
+++ b/drivers/acpi/acpica/hwtimer.c
@@ -101,8 +101,7 @@ acpi_status acpi_get_timer(u32 * ticks)
101 return_ACPI_STATUS(AE_BAD_PARAMETER); 101 return_ACPI_STATUS(AE_BAD_PARAMETER);
102 } 102 }
103 103
104 status = 104 status = acpi_hw_read(ticks, &acpi_gbl_FADT.xpm_timer_block);
105 acpi_hw_read(ticks, &acpi_gbl_FADT.xpm_timer_block);
106 105
107 return_ACPI_STATUS(status); 106 return_ACPI_STATUS(status);
108} 107}
diff --git a/drivers/acpi/acpica/hwxfsleep.c b/drivers/acpi/acpica/hwxfsleep.c
index 0ff1ecea5c3a..ae443fe2ebf6 100644
--- a/drivers/acpi/acpica/hwxfsleep.c
+++ b/drivers/acpi/acpica/hwxfsleep.c
@@ -49,8 +49,7 @@
49ACPI_MODULE_NAME("hwxfsleep") 49ACPI_MODULE_NAME("hwxfsleep")
50 50
51/* Local prototypes */ 51/* Local prototypes */
52static acpi_status 52static acpi_status acpi_hw_sleep_dispatch(u8 sleep_state, u32 function_id);
53acpi_hw_sleep_dispatch(u8 sleep_state, u32 function_id);
54 53
55/* 54/*
56 * Dispatch table used to efficiently branch to the various sleep 55 * Dispatch table used to efficiently branch to the various sleep
@@ -234,8 +233,7 @@ ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state_s4bios)
234 * function. 233 * function.
235 * 234 *
236 ******************************************************************************/ 235 ******************************************************************************/
237static acpi_status 236static acpi_status acpi_hw_sleep_dispatch(u8 sleep_state, u32 function_id)
238acpi_hw_sleep_dispatch(u8 sleep_state, u32 function_id)
239{ 237{
240 acpi_status status; 238 acpi_status status;
241 struct acpi_sleep_functions *sleep_functions = 239 struct acpi_sleep_functions *sleep_functions =
@@ -369,8 +367,7 @@ acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state)
369 return_ACPI_STATUS(AE_AML_OPERAND_VALUE); 367 return_ACPI_STATUS(AE_AML_OPERAND_VALUE);
370 } 368 }
371 369
372 status = 370 status = acpi_hw_sleep_dispatch(sleep_state, ACPI_SLEEP_FUNCTION_ID);
373 acpi_hw_sleep_dispatch(sleep_state, ACPI_SLEEP_FUNCTION_ID);
374 return_ACPI_STATUS(status); 371 return_ACPI_STATUS(status);
375} 372}
376 373
@@ -396,8 +393,7 @@ acpi_status acpi_leave_sleep_state_prep(u8 sleep_state)
396 ACPI_FUNCTION_TRACE(acpi_leave_sleep_state_prep); 393 ACPI_FUNCTION_TRACE(acpi_leave_sleep_state_prep);
397 394
398 status = 395 status =
399 acpi_hw_sleep_dispatch(sleep_state, 396 acpi_hw_sleep_dispatch(sleep_state, ACPI_WAKE_PREP_FUNCTION_ID);
400 ACPI_WAKE_PREP_FUNCTION_ID);
401 return_ACPI_STATUS(status); 397 return_ACPI_STATUS(status);
402} 398}
403 399
diff --git a/drivers/acpi/acpica/nsaccess.c b/drivers/acpi/acpica/nsaccess.c
index 23db53ce2293..fc168e62c1c9 100644
--- a/drivers/acpi/acpica/nsaccess.c
+++ b/drivers/acpi/acpica/nsaccess.c
@@ -179,8 +179,7 @@ acpi_status acpi_ns_root_initialize(void)
179 179
180 /* Build an object around the static string */ 180 /* Build an object around the static string */
181 181
182 obj_desc->string.length = 182 obj_desc->string.length = (u32)ACPI_STRLEN(val);
183 (u32) ACPI_STRLEN(val);
184 obj_desc->string.pointer = val; 183 obj_desc->string.pointer = val;
185 obj_desc->common.flags |= AOPOBJ_STATIC_POINTER; 184 obj_desc->common.flags |= AOPOBJ_STATIC_POINTER;
186 break; 185 break;
diff --git a/drivers/acpi/acpica/nsinit.c b/drivers/acpi/acpica/nsinit.c
index 95ffe8dfa1f1..4328e2adfeb9 100644
--- a/drivers/acpi/acpica/nsinit.c
+++ b/drivers/acpi/acpica/nsinit.c
@@ -96,8 +96,8 @@ acpi_status acpi_ns_initialize_objects(void)
96 /* Walk entire namespace from the supplied root */ 96 /* Walk entire namespace from the supplied root */
97 97
98 status = acpi_walk_namespace(ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, 98 status = acpi_walk_namespace(ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
99 ACPI_UINT32_MAX, acpi_ns_init_one_object, NULL, 99 ACPI_UINT32_MAX, acpi_ns_init_one_object,
100 &info, NULL); 100 NULL, &info, NULL);
101 if (ACPI_FAILURE(status)) { 101 if (ACPI_FAILURE(status)) {
102 ACPI_EXCEPTION((AE_INFO, status, "During WalkNamespace")); 102 ACPI_EXCEPTION((AE_INFO, status, "During WalkNamespace"));
103 } 103 }
diff --git a/drivers/acpi/acpica/psopcode.c b/drivers/acpi/acpica/psopcode.c
index ed1d457bd5ca..e5572a78bdb8 100644
--- a/drivers/acpi/acpica/psopcode.c
+++ b/drivers/acpi/acpica/psopcode.c
@@ -392,10 +392,12 @@ const struct acpi_opcode_info acpi_gbl_aml_op_info[AML_NUM_OPCODES] = {
392 AML_FLAGS_EXEC_1A_0T_1R | AML_NO_OPERAND_RESOLVE), 392 AML_FLAGS_EXEC_1A_0T_1R | AML_NO_OPERAND_RESOLVE),
393/* 38 */ ACPI_OP("LAnd", ARGP_LAND_OP, ARGI_LAND_OP, ACPI_TYPE_ANY, 393/* 38 */ ACPI_OP("LAnd", ARGP_LAND_OP, ARGI_LAND_OP, ACPI_TYPE_ANY,
394 AML_CLASS_EXECUTE, AML_TYPE_EXEC_2A_0T_1R, 394 AML_CLASS_EXECUTE, AML_TYPE_EXEC_2A_0T_1R,
395 AML_FLAGS_EXEC_2A_0T_1R | AML_LOGICAL_NUMERIC | AML_CONSTANT), 395 AML_FLAGS_EXEC_2A_0T_1R | AML_LOGICAL_NUMERIC |
396 AML_CONSTANT),
396/* 39 */ ACPI_OP("LOr", ARGP_LOR_OP, ARGI_LOR_OP, ACPI_TYPE_ANY, 397/* 39 */ ACPI_OP("LOr", ARGP_LOR_OP, ARGI_LOR_OP, ACPI_TYPE_ANY,
397 AML_CLASS_EXECUTE, AML_TYPE_EXEC_2A_0T_1R, 398 AML_CLASS_EXECUTE, AML_TYPE_EXEC_2A_0T_1R,
398 AML_FLAGS_EXEC_2A_0T_1R | AML_LOGICAL_NUMERIC | AML_CONSTANT), 399 AML_FLAGS_EXEC_2A_0T_1R | AML_LOGICAL_NUMERIC |
400 AML_CONSTANT),
399/* 3A */ ACPI_OP("LNot", ARGP_LNOT_OP, ARGI_LNOT_OP, ACPI_TYPE_ANY, 401/* 3A */ ACPI_OP("LNot", ARGP_LNOT_OP, ARGI_LNOT_OP, ACPI_TYPE_ANY,
400 AML_CLASS_EXECUTE, AML_TYPE_EXEC_1A_0T_1R, 402 AML_CLASS_EXECUTE, AML_TYPE_EXEC_1A_0T_1R,
401 AML_FLAGS_EXEC_1A_0T_1R | AML_CONSTANT), 403 AML_FLAGS_EXEC_1A_0T_1R | AML_CONSTANT),
@@ -495,7 +497,8 @@ const struct acpi_opcode_info acpi_gbl_aml_op_info[AML_NUM_OPCODES] = {
495 AML_NSNODE | AML_NAMED | AML_DEFER), 497 AML_NSNODE | AML_NAMED | AML_DEFER),
496/* 59 */ ACPI_OP("Field", ARGP_FIELD_OP, ARGI_FIELD_OP, ACPI_TYPE_ANY, 498/* 59 */ ACPI_OP("Field", ARGP_FIELD_OP, ARGI_FIELD_OP, ACPI_TYPE_ANY,
497 AML_CLASS_NAMED_OBJECT, AML_TYPE_NAMED_FIELD, 499 AML_CLASS_NAMED_OBJECT, AML_TYPE_NAMED_FIELD,
498 AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_FIELD), 500 AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE |
501 AML_FIELD),
499/* 5A */ ACPI_OP("Device", ARGP_DEVICE_OP, ARGI_DEVICE_OP, 502/* 5A */ ACPI_OP("Device", ARGP_DEVICE_OP, ARGI_DEVICE_OP,
500 ACPI_TYPE_DEVICE, AML_CLASS_NAMED_OBJECT, 503 ACPI_TYPE_DEVICE, AML_CLASS_NAMED_OBJECT,
501 AML_TYPE_NAMED_NO_OBJ, 504 AML_TYPE_NAMED_NO_OBJ,
@@ -519,12 +522,13 @@ const struct acpi_opcode_info acpi_gbl_aml_op_info[AML_NUM_OPCODES] = {
519/* 5E */ ACPI_OP("IndexField", ARGP_INDEX_FIELD_OP, ARGI_INDEX_FIELD_OP, 522/* 5E */ ACPI_OP("IndexField", ARGP_INDEX_FIELD_OP, ARGI_INDEX_FIELD_OP,
520 ACPI_TYPE_ANY, AML_CLASS_NAMED_OBJECT, 523 ACPI_TYPE_ANY, AML_CLASS_NAMED_OBJECT,
521 AML_TYPE_NAMED_FIELD, 524 AML_TYPE_NAMED_FIELD,
522 AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_FIELD), 525 AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE |
526 AML_FIELD),
523/* 5F */ ACPI_OP("BankField", ARGP_BANK_FIELD_OP, ARGI_BANK_FIELD_OP, 527/* 5F */ ACPI_OP("BankField", ARGP_BANK_FIELD_OP, ARGI_BANK_FIELD_OP,
524 ACPI_TYPE_LOCAL_BANK_FIELD, AML_CLASS_NAMED_OBJECT, 528 ACPI_TYPE_LOCAL_BANK_FIELD,
525 AML_TYPE_NAMED_FIELD, 529 AML_CLASS_NAMED_OBJECT, AML_TYPE_NAMED_FIELD,
526 AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_FIELD | 530 AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE |
527 AML_DEFER), 531 AML_FIELD | AML_DEFER),
528 532
529/* Internal opcodes that map to invalid AML opcodes */ 533/* Internal opcodes that map to invalid AML opcodes */
530 534
@@ -632,7 +636,8 @@ const struct acpi_opcode_info acpi_gbl_aml_op_info[AML_NUM_OPCODES] = {
632/* 7D */ ACPI_OP("[EvalSubTree]", ARGP_SCOPE_OP, ARGI_SCOPE_OP, 636/* 7D */ ACPI_OP("[EvalSubTree]", ARGP_SCOPE_OP, ARGI_SCOPE_OP,
633 ACPI_TYPE_ANY, AML_CLASS_NAMED_OBJECT, 637 ACPI_TYPE_ANY, AML_CLASS_NAMED_OBJECT,
634 AML_TYPE_NAMED_NO_OBJ, 638 AML_TYPE_NAMED_NO_OBJ,
635 AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE), 639 AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE |
640 AML_NSNODE),
636 641
637/* ACPI 3.0 opcodes */ 642/* ACPI 3.0 opcodes */
638 643
diff --git a/drivers/acpi/acpica/psparse.c b/drivers/acpi/acpica/psparse.c
index 01985703bb98..dfdda00c6fff 100644
--- a/drivers/acpi/acpica/psparse.c
+++ b/drivers/acpi/acpica/psparse.c
@@ -459,8 +459,9 @@ acpi_status acpi_ps_parse_aml(struct acpi_walk_state *walk_state)
459 459
460 /* Executing a control method - additional cleanup */ 460 /* Executing a control method - additional cleanup */
461 461
462 acpi_ds_terminate_control_method( 462 acpi_ds_terminate_control_method(walk_state->
463 walk_state->method_desc, walk_state); 463 method_desc,
464 walk_state);
464 } 465 }
465 466
466 acpi_ds_delete_walk_state(walk_state); 467 acpi_ds_delete_walk_state(walk_state);
diff --git a/drivers/acpi/acpica/rscalc.c b/drivers/acpi/acpica/rscalc.c
index de12469d1c9c..42745676ecdc 100644
--- a/drivers/acpi/acpica/rscalc.c
+++ b/drivers/acpi/acpica/rscalc.c
@@ -664,8 +664,7 @@ acpi_rs_get_pci_routing_table_length(union acpi_operand_object *package_object,
664 (*sub_object_list)->string. 664 (*sub_object_list)->string.
665 length + 1); 665 length + 1);
666 } else { 666 } else {
667 temp_size_needed += 667 temp_size_needed += acpi_ns_get_pathname_length((*sub_object_list)->reference.node);
668 acpi_ns_get_pathname_length((*sub_object_list)->reference.node);
669 } 668 }
670 } else { 669 } else {
671 /* 670 /*