diff options
Diffstat (limited to 'drivers/acpi/tables/tbconvrt.c')
-rw-r--r-- | drivers/acpi/tables/tbconvrt.c | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/drivers/acpi/tables/tbconvrt.c b/drivers/acpi/tables/tbconvrt.c index 5155b27cf032..a913a927d321 100644 --- a/drivers/acpi/tables/tbconvrt.c +++ b/drivers/acpi/tables/tbconvrt.c | |||
@@ -54,12 +54,12 @@ acpi_tb_init_generic_address(struct acpi_generic_address *new_gas_struct, | |||
54 | acpi_physical_address address); | 54 | acpi_physical_address address); |
55 | 55 | ||
56 | static void | 56 | static void |
57 | acpi_tb_convert_fadt1(struct fadt_descriptor_rev2 *local_fadt, | 57 | acpi_tb_convert_fadt1(struct fadt_descriptor *local_fadt, |
58 | struct fadt_descriptor_rev1 *original_fadt); | 58 | struct fadt_descriptor_rev1 *original_fadt); |
59 | 59 | ||
60 | static void | 60 | static void |
61 | acpi_tb_convert_fadt2(struct fadt_descriptor_rev2 *local_fadt, | 61 | acpi_tb_convert_fadt2(struct fadt_descriptor *local_fadt, |
62 | struct fadt_descriptor_rev2 *original_fadt); | 62 | struct fadt_descriptor *original_fadt); |
63 | 63 | ||
64 | u8 acpi_fadt_is_v1; | 64 | u8 acpi_fadt_is_v1; |
65 | ACPI_EXPORT_SYMBOL(acpi_fadt_is_v1) | 65 | ACPI_EXPORT_SYMBOL(acpi_fadt_is_v1) |
@@ -120,7 +120,7 @@ acpi_status acpi_tb_convert_to_xsdt(struct acpi_table_desc *table_info) | |||
120 | { | 120 | { |
121 | acpi_size table_size; | 121 | acpi_size table_size; |
122 | u32 i; | 122 | u32 i; |
123 | XSDT_DESCRIPTOR *new_table; | 123 | struct xsdt_descriptor *new_table; |
124 | 124 | ||
125 | ACPI_FUNCTION_ENTRY(); | 125 | ACPI_FUNCTION_ENTRY(); |
126 | 126 | ||
@@ -151,12 +151,12 @@ acpi_status acpi_tb_convert_to_xsdt(struct acpi_table_desc *table_info) | |||
151 | if (acpi_gbl_root_table_type == ACPI_TABLE_TYPE_RSDT) { | 151 | if (acpi_gbl_root_table_type == ACPI_TABLE_TYPE_RSDT) { |
152 | ACPI_STORE_ADDRESS(new_table->table_offset_entry[i], | 152 | ACPI_STORE_ADDRESS(new_table->table_offset_entry[i], |
153 | (ACPI_CAST_PTR | 153 | (ACPI_CAST_PTR |
154 | (struct rsdt_descriptor_rev1, | 154 | (struct rsdt_descriptor, |
155 | table_info->pointer))-> | 155 | table_info->pointer))-> |
156 | table_offset_entry[i]); | 156 | table_offset_entry[i]); |
157 | } else { | 157 | } else { |
158 | new_table->table_offset_entry[i] = | 158 | new_table->table_offset_entry[i] = |
159 | (ACPI_CAST_PTR(XSDT_DESCRIPTOR, | 159 | (ACPI_CAST_PTR(struct xsdt_descriptor, |
160 | table_info->pointer))-> | 160 | table_info->pointer))-> |
161 | table_offset_entry[i]; | 161 | table_offset_entry[i]; |
162 | } | 162 | } |
@@ -218,7 +218,7 @@ acpi_tb_init_generic_address(struct acpi_generic_address *new_gas_struct, | |||
218 | ******************************************************************************/ | 218 | ******************************************************************************/ |
219 | 219 | ||
220 | static void | 220 | static void |
221 | acpi_tb_convert_fadt1(struct fadt_descriptor_rev2 *local_fadt, | 221 | acpi_tb_convert_fadt1(struct fadt_descriptor *local_fadt, |
222 | struct fadt_descriptor_rev1 *original_fadt) | 222 | struct fadt_descriptor_rev1 *original_fadt) |
223 | { | 223 | { |
224 | 224 | ||
@@ -364,14 +364,13 @@ acpi_tb_convert_fadt1(struct fadt_descriptor_rev2 *local_fadt, | |||
364 | ******************************************************************************/ | 364 | ******************************************************************************/ |
365 | 365 | ||
366 | static void | 366 | static void |
367 | acpi_tb_convert_fadt2(struct fadt_descriptor_rev2 *local_fadt, | 367 | acpi_tb_convert_fadt2(struct fadt_descriptor *local_fadt, |
368 | struct fadt_descriptor_rev2 *original_fadt) | 368 | struct fadt_descriptor *original_fadt) |
369 | { | 369 | { |
370 | 370 | ||
371 | /* We have an ACPI 2.0 FADT but we must copy it to our local buffer */ | 371 | /* We have an ACPI 2.0 FADT but we must copy it to our local buffer */ |
372 | 372 | ||
373 | ACPI_MEMCPY(local_fadt, original_fadt, | 373 | ACPI_MEMCPY(local_fadt, original_fadt, sizeof(struct fadt_descriptor)); |
374 | sizeof(struct fadt_descriptor_rev2)); | ||
375 | 374 | ||
376 | /* | 375 | /* |
377 | * "X" fields are optional extensions to the original V1.0 fields, so | 376 | * "X" fields are optional extensions to the original V1.0 fields, so |
@@ -490,7 +489,7 @@ acpi_tb_convert_fadt2(struct fadt_descriptor_rev2 *local_fadt, | |||
490 | 489 | ||
491 | acpi_status acpi_tb_convert_table_fadt(void) | 490 | acpi_status acpi_tb_convert_table_fadt(void) |
492 | { | 491 | { |
493 | struct fadt_descriptor_rev2 *local_fadt; | 492 | struct fadt_descriptor *local_fadt; |
494 | struct acpi_table_desc *table_desc; | 493 | struct acpi_table_desc *table_desc; |
495 | 494 | ||
496 | ACPI_FUNCTION_TRACE("tb_convert_table_fadt"); | 495 | ACPI_FUNCTION_TRACE("tb_convert_table_fadt"); |
@@ -507,13 +506,13 @@ acpi_status acpi_tb_convert_table_fadt(void) | |||
507 | 506 | ||
508 | /* Allocate buffer for the ACPI 2.0(+) FADT */ | 507 | /* Allocate buffer for the ACPI 2.0(+) FADT */ |
509 | 508 | ||
510 | local_fadt = ACPI_ALLOCATE_ZEROED(sizeof(struct fadt_descriptor_rev2)); | 509 | local_fadt = ACPI_ALLOCATE_ZEROED(sizeof(struct fadt_descriptor)); |
511 | if (!local_fadt) { | 510 | if (!local_fadt) { |
512 | return_ACPI_STATUS(AE_NO_MEMORY); | 511 | return_ACPI_STATUS(AE_NO_MEMORY); |
513 | } | 512 | } |
514 | 513 | ||
515 | if (acpi_gbl_FADT->revision >= FADT2_REVISION_ID) { | 514 | if (acpi_gbl_FADT->revision >= FADT2_REVISION_ID) { |
516 | if (acpi_gbl_FADT->length < sizeof(struct fadt_descriptor_rev2)) { | 515 | if (acpi_gbl_FADT->length < sizeof(struct fadt_descriptor)) { |
517 | 516 | ||
518 | /* Length is too short to be a V2.0 table */ | 517 | /* Length is too short to be a V2.0 table */ |
519 | 518 | ||
@@ -538,7 +537,7 @@ acpi_status acpi_tb_convert_table_fadt(void) | |||
538 | /* Global FADT pointer will point to the new common V2.0 FADT */ | 537 | /* Global FADT pointer will point to the new common V2.0 FADT */ |
539 | 538 | ||
540 | acpi_gbl_FADT = local_fadt; | 539 | acpi_gbl_FADT = local_fadt; |
541 | acpi_gbl_FADT->length = sizeof(FADT_DESCRIPTOR); | 540 | acpi_gbl_FADT->length = sizeof(struct fadt_descriptor); |
542 | 541 | ||
543 | /* Free the original table */ | 542 | /* Free the original table */ |
544 | 543 | ||
@@ -550,7 +549,7 @@ acpi_status acpi_tb_convert_table_fadt(void) | |||
550 | table_desc->pointer = | 549 | table_desc->pointer = |
551 | ACPI_CAST_PTR(struct acpi_table_header, acpi_gbl_FADT); | 550 | ACPI_CAST_PTR(struct acpi_table_header, acpi_gbl_FADT); |
552 | table_desc->allocation = ACPI_MEM_ALLOCATED; | 551 | table_desc->allocation = ACPI_MEM_ALLOCATED; |
553 | table_desc->length = sizeof(struct fadt_descriptor_rev2); | 552 | table_desc->length = sizeof(struct fadt_descriptor); |
554 | 553 | ||
555 | /* Dump the entire FADT */ | 554 | /* Dump the entire FADT */ |
556 | 555 | ||