diff options
Diffstat (limited to 'drivers/acpi/tables/tbgetall.c')
-rw-r--r-- | drivers/acpi/tables/tbgetall.c | 45 |
1 files changed, 29 insertions, 16 deletions
diff --git a/drivers/acpi/tables/tbgetall.c b/drivers/acpi/tables/tbgetall.c index adc4270988bc..eea5b8cb5ebb 100644 --- a/drivers/acpi/tables/tbgetall.c +++ b/drivers/acpi/tables/tbgetall.c | |||
@@ -49,6 +49,19 @@ | |||
49 | #define _COMPONENT ACPI_TABLES | 49 | #define _COMPONENT ACPI_TABLES |
50 | ACPI_MODULE_NAME ("tbgetall") | 50 | ACPI_MODULE_NAME ("tbgetall") |
51 | 51 | ||
52 | /* Local prototypes */ | ||
53 | |||
54 | static acpi_status | ||
55 | acpi_tb_get_primary_table ( | ||
56 | struct acpi_pointer *address, | ||
57 | struct acpi_table_desc *table_info); | ||
58 | |||
59 | static acpi_status | ||
60 | acpi_tb_get_secondary_table ( | ||
61 | struct acpi_pointer *address, | ||
62 | acpi_string signature, | ||
63 | struct acpi_table_desc *table_info); | ||
64 | |||
52 | 65 | ||
53 | /******************************************************************************* | 66 | /******************************************************************************* |
54 | * | 67 | * |
@@ -63,7 +76,7 @@ | |||
63 | * | 76 | * |
64 | ******************************************************************************/ | 77 | ******************************************************************************/ |
65 | 78 | ||
66 | acpi_status | 79 | static acpi_status |
67 | acpi_tb_get_primary_table ( | 80 | acpi_tb_get_primary_table ( |
68 | struct acpi_pointer *address, | 81 | struct acpi_pointer *address, |
69 | struct acpi_table_desc *table_info) | 82 | struct acpi_table_desc *table_info) |
@@ -81,9 +94,8 @@ acpi_tb_get_primary_table ( | |||
81 | return_ACPI_STATUS (AE_OK); | 94 | return_ACPI_STATUS (AE_OK); |
82 | } | 95 | } |
83 | 96 | ||
84 | /* | 97 | /* Get the header in order to get signature and table size */ |
85 | * Get the header in order to get signature and table size | 98 | |
86 | */ | ||
87 | status = acpi_tb_get_table_header (address, &header); | 99 | status = acpi_tb_get_table_header (address, &header); |
88 | if (ACPI_FAILURE (status)) { | 100 | if (ACPI_FAILURE (status)) { |
89 | return_ACPI_STATUS (status); | 101 | return_ACPI_STATUS (status); |
@@ -130,7 +142,7 @@ acpi_tb_get_primary_table ( | |||
130 | * | 142 | * |
131 | ******************************************************************************/ | 143 | ******************************************************************************/ |
132 | 144 | ||
133 | acpi_status | 145 | static acpi_status |
134 | acpi_tb_get_secondary_table ( | 146 | acpi_tb_get_secondary_table ( |
135 | struct acpi_pointer *address, | 147 | struct acpi_pointer *address, |
136 | acpi_string signature, | 148 | acpi_string signature, |
@@ -153,7 +165,8 @@ acpi_tb_get_secondary_table ( | |||
153 | /* Signature must match request */ | 165 | /* Signature must match request */ |
154 | 166 | ||
155 | if (ACPI_STRNCMP (header.signature, signature, ACPI_NAME_SIZE)) { | 167 | if (ACPI_STRNCMP (header.signature, signature, ACPI_NAME_SIZE)) { |
156 | ACPI_REPORT_ERROR (("Incorrect table signature - wanted [%s] found [%4.4s]\n", | 168 | ACPI_REPORT_ERROR (( |
169 | "Incorrect table signature - wanted [%s] found [%4.4s]\n", | ||
157 | signature, header.signature)); | 170 | signature, header.signature)); |
158 | return_ACPI_STATUS (AE_BAD_SIGNATURE); | 171 | return_ACPI_STATUS (AE_BAD_SIGNATURE); |
159 | } | 172 | } |
@@ -230,7 +243,8 @@ acpi_tb_get_required_tables ( | |||
230 | for (i = 0; i < acpi_gbl_rsdt_table_count; i++) { | 243 | for (i = 0; i < acpi_gbl_rsdt_table_count; i++) { |
231 | /* Get the table address from the common internal XSDT */ | 244 | /* Get the table address from the common internal XSDT */ |
232 | 245 | ||
233 | address.pointer.value = acpi_gbl_XSDT->table_offset_entry[i]; | 246 | address.pointer.value = |
247 | acpi_gbl_XSDT->table_offset_entry[i]; | ||
234 | 248 | ||
235 | /* | 249 | /* |
236 | * Get the tables needed by this subsystem (FADT and any SSDTs). | 250 | * Get the tables needed by this subsystem (FADT and any SSDTs). |
@@ -252,18 +266,18 @@ acpi_tb_get_required_tables ( | |||
252 | } | 266 | } |
253 | 267 | ||
254 | /* | 268 | /* |
255 | * Convert the FADT to a common format. This allows earlier revisions of the | 269 | * Convert the FADT to a common format. This allows earlier revisions of |
256 | * table to coexist with newer versions, using common access code. | 270 | * the table to coexist with newer versions, using common access code. |
257 | */ | 271 | */ |
258 | status = acpi_tb_convert_table_fadt (); | 272 | status = acpi_tb_convert_table_fadt (); |
259 | if (ACPI_FAILURE (status)) { | 273 | if (ACPI_FAILURE (status)) { |
260 | ACPI_REPORT_ERROR (("Could not convert FADT to internal common format\n")); | 274 | ACPI_REPORT_ERROR (( |
275 | "Could not convert FADT to internal common format\n")); | ||
261 | return_ACPI_STATUS (status); | 276 | return_ACPI_STATUS (status); |
262 | } | 277 | } |
263 | 278 | ||
264 | /* | 279 | /* Get the FACS (Pointed to by the FADT) */ |
265 | * Get the FACS (Pointed to by the FADT) | 280 | |
266 | */ | ||
267 | address.pointer.value = acpi_gbl_FADT->xfirmware_ctrl; | 281 | address.pointer.value = acpi_gbl_FADT->xfirmware_ctrl; |
268 | 282 | ||
269 | status = acpi_tb_get_secondary_table (&address, FACS_SIG, &table_info); | 283 | status = acpi_tb_get_secondary_table (&address, FACS_SIG, &table_info); |
@@ -282,9 +296,8 @@ acpi_tb_get_required_tables ( | |||
282 | return_ACPI_STATUS (status); | 296 | return_ACPI_STATUS (status); |
283 | } | 297 | } |
284 | 298 | ||
285 | /* | 299 | /* Get/install the DSDT (Pointed to by the FADT) */ |
286 | * Get/install the DSDT (Pointed to by the FADT) | 300 | |
287 | */ | ||
288 | address.pointer.value = acpi_gbl_FADT->Xdsdt; | 301 | address.pointer.value = acpi_gbl_FADT->Xdsdt; |
289 | 302 | ||
290 | status = acpi_tb_get_secondary_table (&address, DSDT_SIG, &table_info); | 303 | status = acpi_tb_get_secondary_table (&address, DSDT_SIG, &table_info); |