diff options
28 files changed, 64 insertions, 58 deletions
diff --git a/drivers/acpi/acpica/aclocal.h b/drivers/acpi/acpica/aclocal.h index 421b048f6640..5ce06935d9de 100644 --- a/drivers/acpi/acpica/aclocal.h +++ b/drivers/acpi/acpica/aclocal.h | |||
@@ -678,6 +678,7 @@ struct acpi_opcode_info { | |||
678 | }; | 678 | }; |
679 | 679 | ||
680 | /* Value associated with the parse object */ | 680 | /* Value associated with the parse object */ |
681 | |||
681 | union acpi_parse_value { | 682 | union acpi_parse_value { |
682 | u64 integer; /* Integer constant (Up to 64 bits) */ | 683 | u64 integer; /* Integer constant (Up to 64 bits) */ |
683 | u32 size; /* bytelist or field size */ | 684 | u32 size; /* bytelist or field size */ |
diff --git a/drivers/acpi/acpica/evxface.c b/drivers/acpi/acpica/evxface.c index 76cfe71c6b28..db820600b503 100644 --- a/drivers/acpi/acpica/evxface.c +++ b/drivers/acpi/acpica/evxface.c | |||
@@ -249,6 +249,7 @@ acpi_remove_notify_handler(acpi_handle device, | |||
249 | (handler_type > ACPI_MAX_NOTIFY_HANDLER_TYPE)) { | 249 | (handler_type > ACPI_MAX_NOTIFY_HANDLER_TYPE)) { |
250 | return_ACPI_STATUS(AE_BAD_PARAMETER); | 250 | return_ACPI_STATUS(AE_BAD_PARAMETER); |
251 | } | 251 | } |
252 | |||
252 | /* Make sure all deferred notify tasks are completed */ | 253 | /* Make sure all deferred notify tasks are completed */ |
253 | 254 | ||
254 | acpi_os_wait_events_complete(); | 255 | acpi_os_wait_events_complete(); |
@@ -622,12 +623,12 @@ acpi_install_gpe_handler(acpi_handle gpe_device, | |||
622 | goto free_and_exit; | 623 | goto free_and_exit; |
623 | } | 624 | } |
624 | 625 | ||
625 | |||
626 | handler->address = address; | 626 | handler->address = address; |
627 | handler->context = context; | 627 | handler->context = context; |
628 | handler->method_node = gpe_event_info->dispatch.method_node; | 628 | handler->method_node = gpe_event_info->dispatch.method_node; |
629 | handler->original_flags = gpe_event_info->flags & | 629 | handler->original_flags = (u8)(gpe_event_info->flags & |
630 | (ACPI_GPE_XRUPT_TYPE_MASK | ACPI_GPE_DISPATCH_MASK); | 630 | (ACPI_GPE_XRUPT_TYPE_MASK | |
631 | ACPI_GPE_DISPATCH_MASK)); | ||
631 | 632 | ||
632 | /* | 633 | /* |
633 | * If the GPE is associated with a method, it may have been enabled | 634 | * If the GPE is associated with a method, it may have been enabled |
@@ -746,10 +747,10 @@ acpi_remove_gpe_handler(acpi_handle gpe_device, | |||
746 | * enabled, it should be enabled at this point to restore the | 747 | * enabled, it should be enabled at this point to restore the |
747 | * post-initialization configuration. | 748 | * post-initialization configuration. |
748 | */ | 749 | */ |
749 | 750 | if ((handler->original_flags & ACPI_GPE_DISPATCH_METHOD) && | |
750 | if ((handler->original_flags & ACPI_GPE_DISPATCH_METHOD) | 751 | handler->originally_enabled) { |
751 | && handler->originally_enabled) | ||
752 | (void)acpi_ev_add_gpe_reference(gpe_event_info); | 752 | (void)acpi_ev_add_gpe_reference(gpe_event_info); |
753 | } | ||
753 | 754 | ||
754 | /* Now we can free the handler object */ | 755 | /* Now we can free the handler object */ |
755 | 756 | ||
diff --git a/drivers/acpi/acpica/evxfevnt.c b/drivers/acpi/acpica/evxfevnt.c index ee6e96c9835a..be57f49dafbd 100644 --- a/drivers/acpi/acpica/evxfevnt.c +++ b/drivers/acpi/acpica/evxfevnt.c | |||
@@ -61,7 +61,6 @@ ACPI_MODULE_NAME("evxfevnt") | |||
61 | * DESCRIPTION: Transfers the system into ACPI mode. | 61 | * DESCRIPTION: Transfers the system into ACPI mode. |
62 | * | 62 | * |
63 | ******************************************************************************/ | 63 | ******************************************************************************/ |
64 | |||
65 | acpi_status acpi_enable(void) | 64 | acpi_status acpi_enable(void) |
66 | { | 65 | { |
67 | acpi_status status; | 66 | acpi_status status; |
diff --git a/drivers/acpi/acpica/evxfgpe.c b/drivers/acpi/acpica/evxfgpe.c index d8095c1bda11..36f8ad87670b 100644 --- a/drivers/acpi/acpica/evxfgpe.c +++ b/drivers/acpi/acpica/evxfgpe.c | |||
@@ -172,6 +172,7 @@ acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number) | |||
172 | acpi_os_release_lock(acpi_gbl_gpe_lock, flags); | 172 | acpi_os_release_lock(acpi_gbl_gpe_lock, flags); |
173 | return_ACPI_STATUS(status); | 173 | return_ACPI_STATUS(status); |
174 | } | 174 | } |
175 | |||
175 | ACPI_EXPORT_SYMBOL(acpi_disable_gpe) | 176 | ACPI_EXPORT_SYMBOL(acpi_disable_gpe) |
176 | 177 | ||
177 | 178 | ||
diff --git a/drivers/acpi/acpica/exconfig.c b/drivers/acpi/acpica/exconfig.c index 9ad64204495e..b4f42f56fc34 100644 --- a/drivers/acpi/acpica/exconfig.c +++ b/drivers/acpi/acpica/exconfig.c | |||
@@ -125,7 +125,6 @@ acpi_ex_add_table(u32 table_index, | |||
125 | * responsible for discovering any new wake GPEs by running _PRW methods | 125 | * responsible for discovering any new wake GPEs by running _PRW methods |
126 | * that may have been loaded by this table. | 126 | * that may have been loaded by this table. |
127 | */ | 127 | */ |
128 | |||
129 | status = acpi_tb_get_owner_id(table_index, &owner_id); | 128 | status = acpi_tb_get_owner_id(table_index, &owner_id); |
130 | if (ACPI_SUCCESS(status)) { | 129 | if (ACPI_SUCCESS(status)) { |
131 | acpi_ev_update_gpes(owner_id); | 130 | acpi_ev_update_gpes(owner_id); |
diff --git a/drivers/acpi/acpica/exmutex.c b/drivers/acpi/acpica/exmutex.c index 900a25155331..02157ef486dd 100644 --- a/drivers/acpi/acpica/exmutex.c +++ b/drivers/acpi/acpica/exmutex.c | |||
@@ -378,6 +378,7 @@ acpi_ex_release_mutex(union acpi_operand_object *obj_desc, | |||
378 | } | 378 | } |
379 | 379 | ||
380 | /* Must have a valid thread ID */ | 380 | /* Must have a valid thread ID */ |
381 | |||
381 | if (!walk_state->thread) { | 382 | if (!walk_state->thread) { |
382 | ACPI_ERROR((AE_INFO, | 383 | ACPI_ERROR((AE_INFO, |
383 | "Cannot release Mutex [%4.4s], null thread info", | 384 | "Cannot release Mutex [%4.4s], null thread info", |
diff --git a/drivers/acpi/acpica/exoparg1.c b/drivers/acpi/acpica/exoparg1.c index bbf01e9bf057..cf50c6c6d926 100644 --- a/drivers/acpi/acpica/exoparg1.c +++ b/drivers/acpi/acpica/exoparg1.c | |||
@@ -948,13 +948,7 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state) | |||
948 | */ | 948 | */ |
949 | return_desc = | 949 | return_desc = |
950 | acpi_ut_create_integer_object((u64) | 950 | acpi_ut_create_integer_object((u64) |
951 | temp_desc-> | 951 | temp_desc->buffer.pointer[operand[0]->reference.value]); |
952 | buffer. | ||
953 | pointer | ||
954 | [operand | ||
955 | [0]-> | ||
956 | reference. | ||
957 | value]); | ||
958 | if (!return_desc) { | 952 | if (!return_desc) { |
959 | status = AE_NO_MEMORY; | 953 | status = AE_NO_MEMORY; |
960 | goto cleanup; | 954 | goto cleanup; |
diff --git a/drivers/acpi/acpica/exregion.c b/drivers/acpi/acpica/exregion.c index 044d44141be6..06a49245f410 100644 --- a/drivers/acpi/acpica/exregion.c +++ b/drivers/acpi/acpica/exregion.c | |||
@@ -162,7 +162,6 @@ acpi_ex_system_memory_space_handler(u32 function, | |||
162 | */ | 162 | */ |
163 | page_boundary_map_length = | 163 | page_boundary_map_length = |
164 | ACPI_ROUND_UP(address, ACPI_DEFAULT_PAGE_SIZE) - address; | 164 | ACPI_ROUND_UP(address, ACPI_DEFAULT_PAGE_SIZE) - address; |
165 | |||
166 | if (page_boundary_map_length == 0) { | 165 | if (page_boundary_map_length == 0) { |
167 | page_boundary_map_length = ACPI_DEFAULT_PAGE_SIZE; | 166 | page_boundary_map_length = ACPI_DEFAULT_PAGE_SIZE; |
168 | } | 167 | } |
@@ -240,19 +239,19 @@ acpi_ex_system_memory_space_handler(u32 function, | |||
240 | 239 | ||
241 | switch (bit_width) { | 240 | switch (bit_width) { |
242 | case 8: | 241 | case 8: |
243 | ACPI_SET8(logical_addr_ptr) = (u8) * value; | 242 | ACPI_SET8(logical_addr_ptr) = (u8)*value; |
244 | break; | 243 | break; |
245 | 244 | ||
246 | case 16: | 245 | case 16: |
247 | ACPI_SET16(logical_addr_ptr) = (u16) * value; | 246 | ACPI_SET16(logical_addr_ptr) = (u16)*value; |
248 | break; | 247 | break; |
249 | 248 | ||
250 | case 32: | 249 | case 32: |
251 | ACPI_SET32(logical_addr_ptr) = (u32) * value; | 250 | ACPI_SET32(logical_addr_ptr) = (u32)*value; |
252 | break; | 251 | break; |
253 | 252 | ||
254 | case 64: | 253 | case 64: |
255 | ACPI_SET64(logical_addr_ptr) = (u64) * value; | 254 | ACPI_SET64(logical_addr_ptr) = (u64)*value; |
256 | break; | 255 | break; |
257 | 256 | ||
258 | default: | 257 | default: |
diff --git a/drivers/acpi/acpica/hwacpi.c b/drivers/acpi/acpica/hwacpi.c index 90a9aea1cee9..effa2b0a5932 100644 --- a/drivers/acpi/acpica/hwacpi.c +++ b/drivers/acpi/acpica/hwacpi.c | |||
@@ -108,8 +108,7 @@ acpi_status acpi_hw_set_mode(u32 mode) | |||
108 | * enable bits to default | 108 | * enable bits to default |
109 | */ | 109 | */ |
110 | status = acpi_hw_write_port(acpi_gbl_FADT.smi_command, | 110 | status = acpi_hw_write_port(acpi_gbl_FADT.smi_command, |
111 | (u32) acpi_gbl_FADT.acpi_disable, | 111 | (u32)acpi_gbl_FADT.acpi_disable, 8); |
112 | 8); | ||
113 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | 112 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, |
114 | "Attempting to enable Legacy (non-ACPI) mode\n")); | 113 | "Attempting to enable Legacy (non-ACPI) mode\n")); |
115 | break; | 114 | break; |
diff --git a/drivers/acpi/acpica/hwregs.c b/drivers/acpi/acpica/hwregs.c index e782b5a22fe5..fd4e2dc2c641 100644 --- a/drivers/acpi/acpica/hwregs.c +++ b/drivers/acpi/acpica/hwregs.c | |||
@@ -363,8 +363,7 @@ acpi_status acpi_hw_write_pm1_control(u32 pm1a_control, u32 pm1b_control) | |||
363 | * DESCRIPTION: Read from the specified ACPI register | 363 | * DESCRIPTION: Read from the specified ACPI register |
364 | * | 364 | * |
365 | ******************************************************************************/ | 365 | ******************************************************************************/ |
366 | acpi_status | 366 | acpi_status acpi_hw_register_read(u32 register_id, u32 *return_value) |
367 | acpi_hw_register_read(u32 register_id, u32 * return_value) | ||
368 | { | 367 | { |
369 | u32 value = 0; | 368 | u32 value = 0; |
370 | acpi_status status; | 369 | acpi_status status; |
diff --git a/drivers/acpi/acpica/nsrepair2.c b/drivers/acpi/acpica/nsrepair2.c index 90189251cdf0..fdb818d72a07 100644 --- a/drivers/acpi/acpica/nsrepair2.c +++ b/drivers/acpi/acpica/nsrepair2.c | |||
@@ -55,7 +55,8 @@ ACPI_MODULE_NAME("nsrepair2") | |||
55 | */ | 55 | */ |
56 | typedef | 56 | typedef |
57 | acpi_status(*acpi_repair_function) (struct acpi_predefined_data *data, | 57 | acpi_status(*acpi_repair_function) (struct acpi_predefined_data *data, |
58 | union acpi_operand_object **return_object_ptr); | 58 | union acpi_operand_object |
59 | **return_object_ptr); | ||
59 | 60 | ||
60 | typedef struct acpi_repair_info { | 61 | typedef struct acpi_repair_info { |
61 | char name[ACPI_NAME_SIZE]; | 62 | char name[ACPI_NAME_SIZE]; |
diff --git a/drivers/acpi/acpica/nsutils.c b/drivers/acpi/acpica/nsutils.c index 479aad0dbf41..7e8bd2af806d 100644 --- a/drivers/acpi/acpica/nsutils.c +++ b/drivers/acpi/acpica/nsutils.c | |||
@@ -111,7 +111,7 @@ acpi_ns_print_node_pathname(struct acpi_namespace_node *node, | |||
111 | u8 acpi_ns_valid_root_prefix(char prefix) | 111 | u8 acpi_ns_valid_root_prefix(char prefix) |
112 | { | 112 | { |
113 | 113 | ||
114 | return ((u8) (prefix == '\\')); | 114 | return ((u8)(prefix == '\\')); |
115 | } | 115 | } |
116 | 116 | ||
117 | /******************************************************************************* | 117 | /******************************************************************************* |
@@ -129,7 +129,7 @@ u8 acpi_ns_valid_root_prefix(char prefix) | |||
129 | static u8 acpi_ns_valid_path_separator(char sep) | 129 | static u8 acpi_ns_valid_path_separator(char sep) |
130 | { | 130 | { |
131 | 131 | ||
132 | return ((u8) (sep == '.')); | 132 | return ((u8)(sep == '.')); |
133 | } | 133 | } |
134 | 134 | ||
135 | /******************************************************************************* | 135 | /******************************************************************************* |
@@ -673,7 +673,7 @@ u32 acpi_ns_opens_scope(acpi_object_type type) | |||
673 | return_UINT32(ACPI_NS_NORMAL); | 673 | return_UINT32(ACPI_NS_NORMAL); |
674 | } | 674 | } |
675 | 675 | ||
676 | return_UINT32(((u32) acpi_gbl_ns_properties[type]) & ACPI_NS_NEWSCOPE); | 676 | return_UINT32(((u32)acpi_gbl_ns_properties[type]) & ACPI_NS_NEWSCOPE); |
677 | } | 677 | } |
678 | 678 | ||
679 | /******************************************************************************* | 679 | /******************************************************************************* |
diff --git a/drivers/acpi/acpica/nsxfeval.c b/drivers/acpi/acpica/nsxfeval.c index 5c05ba3bc0d5..a5d8ccce10fd 100644 --- a/drivers/acpi/acpica/nsxfeval.c +++ b/drivers/acpi/acpica/nsxfeval.c | |||
@@ -606,7 +606,9 @@ acpi_ns_get_device_callback(acpi_handle obj_handle, | |||
606 | for (i = 0; i < cid->count; i++) { | 606 | for (i = 0; i < cid->count; i++) { |
607 | if (ACPI_STRCMP(cid->ids[i].string, info->hid) | 607 | if (ACPI_STRCMP(cid->ids[i].string, info->hid) |
608 | == 0) { | 608 | == 0) { |
609 | |||
609 | /* Found a matching CID */ | 610 | /* Found a matching CID */ |
611 | |||
610 | found = TRUE; | 612 | found = TRUE; |
611 | break; | 613 | break; |
612 | } | 614 | } |
diff --git a/drivers/acpi/acpica/psutils.c b/drivers/acpi/acpica/psutils.c index 4137dcb352d1..afefb3a1b577 100644 --- a/drivers/acpi/acpica/psutils.c +++ b/drivers/acpi/acpica/psutils.c | |||
@@ -206,7 +206,7 @@ u8 acpi_ps_is_leading_char(u32 c) | |||
206 | */ | 206 | */ |
207 | u8 acpi_ps_is_prefix_char(u32 c) | 207 | u8 acpi_ps_is_prefix_char(u32 c) |
208 | { | 208 | { |
209 | return ((u8) (c == '\\' || c == '^')); | 209 | return ((u8)(c == '\\' || c == '^')); |
210 | } | 210 | } |
211 | 211 | ||
212 | /* | 212 | /* |
diff --git a/drivers/acpi/acpica/rscreate.c b/drivers/acpi/acpica/rscreate.c index 311cbc4f05fa..81333264e992 100644 --- a/drivers/acpi/acpica/rscreate.c +++ b/drivers/acpi/acpica/rscreate.c | |||
@@ -480,8 +480,7 @@ acpi_rs_create_aml_resources(struct acpi_resource *linked_list_buffer, | |||
480 | status = acpi_rs_get_aml_length(linked_list_buffer, &aml_size_needed); | 480 | status = acpi_rs_get_aml_length(linked_list_buffer, &aml_size_needed); |
481 | 481 | ||
482 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "AmlSizeNeeded=%X, %s\n", | 482 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "AmlSizeNeeded=%X, %s\n", |
483 | (u32) aml_size_needed, | 483 | (u32)aml_size_needed, acpi_format_exception(status))); |
484 | acpi_format_exception(status))); | ||
485 | if (ACPI_FAILURE(status)) { | 484 | if (ACPI_FAILURE(status)) { |
486 | return_ACPI_STATUS(status); | 485 | return_ACPI_STATUS(status); |
487 | } | 486 | } |
diff --git a/drivers/acpi/acpica/rsdump.c b/drivers/acpi/acpica/rsdump.c index 4d11b072388c..276e52f2236d 100644 --- a/drivers/acpi/acpica/rsdump.c +++ b/drivers/acpi/acpica/rsdump.c | |||
@@ -654,7 +654,8 @@ acpi_rs_dump_descriptor(void *resource, struct acpi_rsdump_info *table) | |||
654 | /* | 654 | /* |
655 | * Optional resource_source for Address resources | 655 | * Optional resource_source for Address resources |
656 | */ | 656 | */ |
657 | acpi_rs_dump_resource_source(ACPI_CAST_PTR(struct | 657 | acpi_rs_dump_resource_source(ACPI_CAST_PTR |
658 | (struct | ||
658 | acpi_resource_source, | 659 | acpi_resource_source, |
659 | target)); | 660 | target)); |
660 | break; | 661 | break; |
diff --git a/drivers/acpi/acpica/rsirq.c b/drivers/acpi/acpica/rsirq.c index e23a9ec248cb..a718eca8e825 100644 --- a/drivers/acpi/acpica/rsirq.c +++ b/drivers/acpi/acpica/rsirq.c | |||
@@ -212,15 +212,13 @@ struct acpi_rsconvert_info acpi_rs_convert_ext_irq[9] = { | |||
212 | 212 | ||
213 | {ACPI_RSC_COUNT, ACPI_RS_OFFSET(data.extended_irq.interrupt_count), | 213 | {ACPI_RSC_COUNT, ACPI_RS_OFFSET(data.extended_irq.interrupt_count), |
214 | AML_OFFSET(extended_irq.interrupt_count), | 214 | AML_OFFSET(extended_irq.interrupt_count), |
215 | sizeof(u32)} | 215 | sizeof(u32)}, |
216 | , | ||
217 | 216 | ||
218 | /* Copy every IRQ in the table, each is 32 bits */ | 217 | /* Copy every IRQ in the table, each is 32 bits */ |
219 | 218 | ||
220 | {ACPI_RSC_MOVE32, ACPI_RS_OFFSET(data.extended_irq.interrupts[0]), | 219 | {ACPI_RSC_MOVE32, ACPI_RS_OFFSET(data.extended_irq.interrupts[0]), |
221 | AML_OFFSET(extended_irq.interrupts[0]), | 220 | AML_OFFSET(extended_irq.interrupts[0]), |
222 | 0} | 221 | 0}, |
223 | , | ||
224 | 222 | ||
225 | /* Optional resource_source (Index and String) */ | 223 | /* Optional resource_source (Index and String) */ |
226 | 224 | ||
diff --git a/drivers/acpi/acpica/rsmemory.c b/drivers/acpi/acpica/rsmemory.c index 4fd611ad02b4..d446103a61cb 100644 --- a/drivers/acpi/acpica/rsmemory.c +++ b/drivers/acpi/acpica/rsmemory.c | |||
@@ -156,8 +156,7 @@ struct acpi_rsconvert_info acpi_rs_get_vendor_small[3] = { | |||
156 | 156 | ||
157 | {ACPI_RSC_COUNT16, ACPI_RS_OFFSET(data.vendor.byte_length), | 157 | {ACPI_RSC_COUNT16, ACPI_RS_OFFSET(data.vendor.byte_length), |
158 | 0, | 158 | 0, |
159 | sizeof(u8)} | 159 | sizeof(u8)}, |
160 | , | ||
161 | 160 | ||
162 | /* Vendor data */ | 161 | /* Vendor data */ |
163 | 162 | ||
@@ -181,8 +180,7 @@ struct acpi_rsconvert_info acpi_rs_get_vendor_large[3] = { | |||
181 | 180 | ||
182 | {ACPI_RSC_COUNT16, ACPI_RS_OFFSET(data.vendor.byte_length), | 181 | {ACPI_RSC_COUNT16, ACPI_RS_OFFSET(data.vendor.byte_length), |
183 | 0, | 182 | 0, |
184 | sizeof(u8)} | 183 | sizeof(u8)}, |
185 | , | ||
186 | 184 | ||
187 | /* Vendor data */ | 185 | /* Vendor data */ |
188 | 186 | ||
diff --git a/drivers/acpi/acpica/rsmisc.c b/drivers/acpi/acpica/rsmisc.c index c6f291c2bc83..3d0e15cd1276 100644 --- a/drivers/acpi/acpica/rsmisc.c +++ b/drivers/acpi/acpica/rsmisc.c | |||
@@ -159,7 +159,7 @@ acpi_rs_convert_aml_to_resource(struct acpi_resource *resource, | |||
159 | case ACPI_RSC_COUNT: | 159 | case ACPI_RSC_COUNT: |
160 | 160 | ||
161 | item_count = ACPI_GET8(source); | 161 | item_count = ACPI_GET8(source); |
162 | ACPI_SET8(destination) = (u8) item_count; | 162 | ACPI_SET8(destination) = (u8)item_count; |
163 | 163 | ||
164 | resource->length = resource->length + | 164 | resource->length = resource->length + |
165 | (info->value * (item_count - 1)); | 165 | (info->value * (item_count - 1)); |
@@ -385,7 +385,7 @@ acpi_rs_convert_aml_to_resource(struct acpi_resource *resource, | |||
385 | } | 385 | } |
386 | 386 | ||
387 | target = ACPI_ADD_PTR(char, resource, info->value); | 387 | target = ACPI_ADD_PTR(char, resource, info->value); |
388 | ACPI_SET8(target) = (u8) item_count; | 388 | ACPI_SET8(target) = (u8)item_count; |
389 | break; | 389 | break; |
390 | 390 | ||
391 | case ACPI_RSC_BITMASK16: | 391 | case ACPI_RSC_BITMASK16: |
@@ -401,7 +401,7 @@ acpi_rs_convert_aml_to_resource(struct acpi_resource *resource, | |||
401 | } | 401 | } |
402 | 402 | ||
403 | target = ACPI_ADD_PTR(char, resource, info->value); | 403 | target = ACPI_ADD_PTR(char, resource, info->value); |
404 | ACPI_SET8(target) = (u8) item_count; | 404 | ACPI_SET8(target) = (u8)item_count; |
405 | break; | 405 | break; |
406 | 406 | ||
407 | case ACPI_RSC_EXIT_NE: | 407 | case ACPI_RSC_EXIT_NE: |
@@ -544,7 +544,7 @@ acpi_rs_convert_resource_to_aml(struct acpi_resource *resource, | |||
544 | case ACPI_RSC_COUNT: | 544 | case ACPI_RSC_COUNT: |
545 | 545 | ||
546 | item_count = ACPI_GET8(source); | 546 | item_count = ACPI_GET8(source); |
547 | ACPI_SET8(destination) = (u8) item_count; | 547 | ACPI_SET8(destination) = (u8)item_count; |
548 | 548 | ||
549 | aml_length = | 549 | aml_length = |
550 | (u16) (aml_length + | 550 | (u16) (aml_length + |
@@ -686,7 +686,8 @@ acpi_rs_convert_resource_to_aml(struct acpi_resource *resource, | |||
686 | * Optional resource_source (Index and String) | 686 | * Optional resource_source (Index and String) |
687 | */ | 687 | */ |
688 | aml_length = | 688 | aml_length = |
689 | acpi_rs_set_resource_source(aml, (acpi_rs_length) | 689 | acpi_rs_set_resource_source(aml, |
690 | (acpi_rs_length) | ||
690 | aml_length, source); | 691 | aml_length, source); |
691 | acpi_rs_set_resource_length(aml_length, aml); | 692 | acpi_rs_set_resource_length(aml_length, aml); |
692 | break; | 693 | break; |
diff --git a/drivers/acpi/acpica/rsutils.c b/drivers/acpi/acpica/rsutils.c index 37d5241c0acf..441447f238f0 100644 --- a/drivers/acpi/acpica/rsutils.c +++ b/drivers/acpi/acpica/rsutils.c | |||
@@ -358,8 +358,10 @@ acpi_rs_get_resource_source(acpi_rs_length resource_length, | |||
358 | * | 358 | * |
359 | * Zero the entire area of the buffer. | 359 | * Zero the entire area of the buffer. |
360 | */ | 360 | */ |
361 | total_length = (u32) | 361 | total_length = |
362 | ACPI_STRLEN(ACPI_CAST_PTR(char, &aml_resource_source[1])) + 1; | 362 | (u32) |
363 | ACPI_STRLEN(ACPI_CAST_PTR(char, &aml_resource_source[1])) + | ||
364 | 1; | ||
363 | total_length = (u32) ACPI_ROUND_UP_TO_NATIVE_WORD(total_length); | 365 | total_length = (u32) ACPI_ROUND_UP_TO_NATIVE_WORD(total_length); |
364 | 366 | ||
365 | ACPI_MEMSET(resource_source->string_ptr, 0, total_length); | 367 | ACPI_MEMSET(resource_source->string_ptr, 0, total_length); |
diff --git a/drivers/acpi/acpica/uteval.c b/drivers/acpi/acpica/uteval.c index a9c65fbea5f4..45cddb8b1101 100644 --- a/drivers/acpi/acpica/uteval.c +++ b/drivers/acpi/acpica/uteval.c | |||
@@ -68,7 +68,7 @@ ACPI_MODULE_NAME("uteval") | |||
68 | ******************************************************************************/ | 68 | ******************************************************************************/ |
69 | 69 | ||
70 | acpi_status | 70 | acpi_status |
71 | acpi_ut_evaluate_object(struct acpi_namespace_node *prefix_node, | 71 | acpi_ut_evaluate_object(struct acpi_namespace_node * prefix_node, |
72 | char *path, | 72 | char *path, |
73 | u32 expected_return_btypes, | 73 | u32 expected_return_btypes, |
74 | union acpi_operand_object **return_desc) | 74 | union acpi_operand_object **return_desc) |
diff --git a/drivers/acpi/acpica/utglobal.c b/drivers/acpi/acpica/utglobal.c index 4080088f937c..c083611c76a6 100644 --- a/drivers/acpi/acpica/utglobal.c +++ b/drivers/acpi/acpica/utglobal.c | |||
@@ -373,6 +373,7 @@ acpi_status acpi_ut_init_globals(void) | |||
373 | } | 373 | } |
374 | 374 | ||
375 | /* Public globals */ | 375 | /* Public globals */ |
376 | |||
376 | ACPI_EXPORT_SYMBOL(acpi_gbl_FADT) | 377 | ACPI_EXPORT_SYMBOL(acpi_gbl_FADT) |
377 | ACPI_EXPORT_SYMBOL(acpi_dbg_level) | 378 | ACPI_EXPORT_SYMBOL(acpi_dbg_level) |
378 | ACPI_EXPORT_SYMBOL(acpi_dbg_layer) | 379 | ACPI_EXPORT_SYMBOL(acpi_dbg_layer) |
diff --git a/drivers/acpi/acpica/utresrc.c b/drivers/acpi/acpica/utresrc.c index e38bef4980bc..7d0a1b5dedff 100644 --- a/drivers/acpi/acpica/utresrc.c +++ b/drivers/acpi/acpica/utresrc.c | |||
@@ -412,7 +412,7 @@ static const u8 acpi_gbl_resource_types[] = { | |||
412 | ******************************************************************************/ | 412 | ******************************************************************************/ |
413 | 413 | ||
414 | acpi_status | 414 | acpi_status |
415 | acpi_ut_walk_aml_resources(u8 * aml, | 415 | acpi_ut_walk_aml_resources(u8 *aml, |
416 | acpi_size aml_length, | 416 | acpi_size aml_length, |
417 | acpi_walk_aml_callback user_function, void **context) | 417 | acpi_walk_aml_callback user_function, void **context) |
418 | { | 418 | { |
@@ -525,7 +525,7 @@ acpi_ut_walk_aml_resources(u8 * aml, | |||
525 | * | 525 | * |
526 | ******************************************************************************/ | 526 | ******************************************************************************/ |
527 | 527 | ||
528 | acpi_status acpi_ut_validate_resource(void *aml, u8 * return_index) | 528 | acpi_status acpi_ut_validate_resource(void *aml, u8 *return_index) |
529 | { | 529 | { |
530 | union aml_resource *aml_resource; | 530 | union aml_resource *aml_resource; |
531 | u8 resource_type; | 531 | u8 resource_type; |
@@ -800,8 +800,7 @@ u32 acpi_ut_get_descriptor_length(void *aml) | |||
800 | ******************************************************************************/ | 800 | ******************************************************************************/ |
801 | 801 | ||
802 | acpi_status | 802 | acpi_status |
803 | acpi_ut_get_resource_end_tag(union acpi_operand_object * obj_desc, | 803 | acpi_ut_get_resource_end_tag(union acpi_operand_object *obj_desc, u8 **end_tag) |
804 | u8 ** end_tag) | ||
805 | { | 804 | { |
806 | acpi_status status; | 805 | acpi_status status; |
807 | 806 | ||
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h index 33a3e17da362..dfcedc6da9ac 100644 --- a/include/acpi/acpiosxf.h +++ b/include/acpi/acpiosxf.h | |||
@@ -102,10 +102,8 @@ acpi_os_physical_table_override(struct acpi_table_header *existing_table, | |||
102 | /* | 102 | /* |
103 | * Spinlock primitives | 103 | * Spinlock primitives |
104 | */ | 104 | */ |
105 | |||
106 | #ifndef acpi_os_create_lock | 105 | #ifndef acpi_os_create_lock |
107 | acpi_status | 106 | acpi_status acpi_os_create_lock(acpi_spinlock * out_handle); |
108 | acpi_os_create_lock(acpi_spinlock *out_handle); | ||
109 | #endif | 107 | #endif |
110 | 108 | ||
111 | void acpi_os_delete_lock(acpi_spinlock handle); | 109 | void acpi_os_delete_lock(acpi_spinlock handle); |
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index b409406d3ccf..b77ee009bcfc 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h | |||
@@ -62,10 +62,14 @@ extern u32 acpi_current_gpe_count; | |||
62 | extern struct acpi_table_fadt acpi_gbl_FADT; | 62 | extern struct acpi_table_fadt acpi_gbl_FADT; |
63 | extern u8 acpi_gbl_system_awake_and_running; | 63 | extern u8 acpi_gbl_system_awake_and_running; |
64 | extern u8 acpi_gbl_reduced_hardware; /* ACPI 5.0 */ | 64 | extern u8 acpi_gbl_reduced_hardware; /* ACPI 5.0 */ |
65 | |||
65 | /* Runtime configuration of debug print levels */ | 66 | /* Runtime configuration of debug print levels */ |
67 | |||
66 | extern u32 acpi_dbg_level; | 68 | extern u32 acpi_dbg_level; |
67 | extern u32 acpi_dbg_layer; | 69 | extern u32 acpi_dbg_layer; |
70 | |||
68 | /* ACPICA runtime options */ | 71 | /* ACPICA runtime options */ |
72 | |||
69 | extern u8 acpi_gbl_enable_interpreter_slack; | 73 | extern u8 acpi_gbl_enable_interpreter_slack; |
70 | extern u8 acpi_gbl_all_methods_serialized; | 74 | extern u8 acpi_gbl_all_methods_serialized; |
71 | extern u8 acpi_gbl_create_osi_method; | 75 | extern u8 acpi_gbl_create_osi_method; |
diff --git a/include/acpi/actbl.h b/include/acpi/actbl.h index c0e6c32353ed..ee050e86d17c 100644 --- a/include/acpi/actbl.h +++ b/include/acpi/actbl.h | |||
@@ -357,7 +357,6 @@ struct acpi_table_desc { | |||
357 | /* | 357 | /* |
358 | * Get the remaining ACPI tables | 358 | * Get the remaining ACPI tables |
359 | */ | 359 | */ |
360 | |||
361 | #include <acpi/actbl1.h> | 360 | #include <acpi/actbl1.h> |
362 | #include <acpi/actbl2.h> | 361 | #include <acpi/actbl2.h> |
363 | #include <acpi/actbl3.h> | 362 | #include <acpi/actbl3.h> |
diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h index cec6cd3e850d..a74afaf1b80c 100644 --- a/include/acpi/platform/acenv.h +++ b/include/acpi/platform/acenv.h | |||
@@ -49,6 +49,7 @@ | |||
49 | * to the local environment. This includes compiler-specific, OS-specific, | 49 | * to the local environment. This includes compiler-specific, OS-specific, |
50 | * and machine-specific configuration. | 50 | * and machine-specific configuration. |
51 | */ | 51 | */ |
52 | |||
52 | /* Types for ACPI_MUTEX_TYPE */ | 53 | /* Types for ACPI_MUTEX_TYPE */ |
53 | 54 | ||
54 | #define ACPI_BINARY_SEMAPHORE 0 | 55 | #define ACPI_BINARY_SEMAPHORE 0 |
@@ -66,6 +67,7 @@ | |||
66 | *****************************************************************************/ | 67 | *****************************************************************************/ |
67 | 68 | ||
68 | /* iASL configuration */ | 69 | /* iASL configuration */ |
70 | |||
69 | #ifdef ACPI_ASL_COMPILER | 71 | #ifdef ACPI_ASL_COMPILER |
70 | #define ACPI_APPLICATION | 72 | #define ACPI_APPLICATION |
71 | #define ACPI_DISASSEMBLER | 73 | #define ACPI_DISASSEMBLER |
@@ -77,6 +79,7 @@ | |||
77 | #endif | 79 | #endif |
78 | 80 | ||
79 | /* acpi_exec configuration. Multithreaded with full AML debugger */ | 81 | /* acpi_exec configuration. Multithreaded with full AML debugger */ |
82 | |||
80 | #ifdef ACPI_EXEC_APP | 83 | #ifdef ACPI_EXEC_APP |
81 | #define ACPI_APPLICATION | 84 | #define ACPI_APPLICATION |
82 | #define ACPI_FULL_DEBUG | 85 | #define ACPI_FULL_DEBUG |
@@ -117,12 +120,14 @@ | |||
117 | #endif | 120 | #endif |
118 | 121 | ||
119 | /* Common for all ACPICA applications */ | 122 | /* Common for all ACPICA applications */ |
123 | |||
120 | #ifdef ACPI_APPLICATION | 124 | #ifdef ACPI_APPLICATION |
121 | #define ACPI_USE_SYSTEM_CLIBRARY | 125 | #define ACPI_USE_SYSTEM_CLIBRARY |
122 | #define ACPI_USE_LOCAL_CACHE | 126 | #define ACPI_USE_LOCAL_CACHE |
123 | #endif | 127 | #endif |
124 | 128 | ||
125 | /* Common debug support */ | 129 | /* Common debug support */ |
130 | |||
126 | #ifdef ACPI_FULL_DEBUG | 131 | #ifdef ACPI_FULL_DEBUG |
127 | #define ACPI_DEBUGGER | 132 | #define ACPI_DEBUGGER |
128 | #define ACPI_DEBUG_OUTPUT | 133 | #define ACPI_DEBUG_OUTPUT |
@@ -138,6 +143,7 @@ | |||
138 | * by the host files. | 143 | * by the host files. |
139 | * | 144 | * |
140 | *****************************************************************************/ | 145 | *****************************************************************************/ |
146 | |||
141 | #if defined(_LINUX) || defined(__linux__) | 147 | #if defined(_LINUX) || defined(__linux__) |
142 | #include <acpi/platform/aclinux.h> | 148 | #include <acpi/platform/aclinux.h> |
143 | 149 | ||
@@ -294,7 +300,9 @@ | |||
294 | /* Use the standard C library headers. We want to keep these to a minimum. */ | 300 | /* Use the standard C library headers. We want to keep these to a minimum. */ |
295 | 301 | ||
296 | #ifdef ACPI_USE_STANDARD_HEADERS | 302 | #ifdef ACPI_USE_STANDARD_HEADERS |
303 | |||
297 | /* Use the standard headers from the standard locations */ | 304 | /* Use the standard headers from the standard locations */ |
305 | |||
298 | #include <stdarg.h> | 306 | #include <stdarg.h> |
299 | #include <stdlib.h> | 307 | #include <stdlib.h> |
300 | #include <string.h> | 308 | #include <string.h> |
@@ -303,6 +311,7 @@ | |||
303 | #endif /* ACPI_USE_STANDARD_HEADERS */ | 311 | #endif /* ACPI_USE_STANDARD_HEADERS */ |
304 | 312 | ||
305 | /* We will be linking to the standard Clib functions */ | 313 | /* We will be linking to the standard Clib functions */ |
314 | |||
306 | #define ACPI_STRSTR(s1,s2) strstr((s1), (s2)) | 315 | #define ACPI_STRSTR(s1,s2) strstr((s1), (s2)) |
307 | #define ACPI_STRCHR(s1,c) strchr((s1), (c)) | 316 | #define ACPI_STRCHR(s1,c) strchr((s1), (c)) |
308 | #define ACPI_STRLEN(s) (acpi_size) strlen((s)) | 317 | #define ACPI_STRLEN(s) (acpi_size) strlen((s)) |
@@ -340,7 +349,6 @@ | |||
340 | * implementation provided by a native C library, but they are functionally | 349 | * implementation provided by a native C library, but they are functionally |
341 | * equivalent. | 350 | * equivalent. |
342 | */ | 351 | */ |
343 | |||
344 | #ifndef va_arg | 352 | #ifndef va_arg |
345 | 353 | ||
346 | #ifndef _VALIST | 354 | #ifndef _VALIST |
@@ -349,10 +357,12 @@ typedef char *va_list; | |||
349 | #endif /* _VALIST */ | 357 | #endif /* _VALIST */ |
350 | 358 | ||
351 | /* Storage alignment properties */ | 359 | /* Storage alignment properties */ |
360 | |||
352 | #define _AUPBND (sizeof (acpi_native_int) - 1) | 361 | #define _AUPBND (sizeof (acpi_native_int) - 1) |
353 | #define _ADNBND (sizeof (acpi_native_int) - 1) | 362 | #define _ADNBND (sizeof (acpi_native_int) - 1) |
354 | 363 | ||
355 | /* Variable argument list macro definitions */ | 364 | /* Variable argument list macro definitions */ |
365 | |||
356 | #define _bnd(X, bnd) (((sizeof (X)) + (bnd)) & (~(bnd))) | 366 | #define _bnd(X, bnd) (((sizeof (X)) + (bnd)) & (~(bnd))) |
357 | #define va_arg(ap, T) (*(T *)(((ap) += (_bnd (T, _AUPBND))) - (_bnd (T,_ADNBND)))) | 367 | #define va_arg(ap, T) (*(T *)(((ap) += (_bnd (T, _AUPBND))) - (_bnd (T,_ADNBND)))) |
358 | #define va_end(ap) (ap = (va_list) NULL) | 368 | #define va_end(ap) (ap = (va_list) NULL) |
@@ -361,6 +371,7 @@ typedef char *va_list; | |||
361 | #endif /* va_arg */ | 371 | #endif /* va_arg */ |
362 | 372 | ||
363 | /* Use the local (ACPICA) definitions of the clib functions */ | 373 | /* Use the local (ACPICA) definitions of the clib functions */ |
374 | |||
364 | #define ACPI_STRSTR(s1,s2) acpi_ut_strstr ((s1), (s2)) | 375 | #define ACPI_STRSTR(s1,s2) acpi_ut_strstr ((s1), (s2)) |
365 | #define ACPI_STRCHR(s1,c) acpi_ut_strchr ((s1), (c)) | 376 | #define ACPI_STRCHR(s1,c) acpi_ut_strchr ((s1), (c)) |
366 | #define ACPI_STRLEN(s) (acpi_size) acpi_ut_strlen ((s)) | 377 | #define ACPI_STRLEN(s) (acpi_size) acpi_ut_strlen ((s)) |
diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h index 85d5d8f38452..33d05b06c6ef 100644 --- a/include/acpi/platform/aclinux.h +++ b/include/acpi/platform/aclinux.h | |||
@@ -108,7 +108,6 @@ | |||
108 | 108 | ||
109 | #include <acpi/platform/acgcc.h> | 109 | #include <acpi/platform/acgcc.h> |
110 | 110 | ||
111 | |||
112 | #ifdef __KERNEL__ | 111 | #ifdef __KERNEL__ |
113 | #include <acpi/actypes.h> | 112 | #include <acpi/actypes.h> |
114 | /* | 113 | /* |