diff options
Diffstat (limited to 'drivers/acpi/tables/tbxface.c')
| -rw-r--r-- | drivers/acpi/tables/tbxface.c | 42 |
1 files changed, 23 insertions, 19 deletions
diff --git a/drivers/acpi/tables/tbxface.c b/drivers/acpi/tables/tbxface.c index 9fe53c9d5b9a..4e91f2984815 100644 --- a/drivers/acpi/tables/tbxface.c +++ b/drivers/acpi/tables/tbxface.c | |||
| @@ -42,8 +42,6 @@ | |||
| 42 | * POSSIBILITY OF SUCH DAMAGES. | 42 | * POSSIBILITY OF SUCH DAMAGES. |
| 43 | */ | 43 | */ |
| 44 | 44 | ||
| 45 | #include <linux/module.h> | ||
| 46 | |||
| 47 | #include <acpi/acpi.h> | 45 | #include <acpi/acpi.h> |
| 48 | #include <acpi/acnamesp.h> | 46 | #include <acpi/acnamesp.h> |
| 49 | #include <acpi/actables.h> | 47 | #include <acpi/actables.h> |
| @@ -68,7 +66,7 @@ acpi_status acpi_load_tables(void) | |||
| 68 | struct acpi_pointer rsdp_address; | 66 | struct acpi_pointer rsdp_address; |
| 69 | acpi_status status; | 67 | acpi_status status; |
| 70 | 68 | ||
| 71 | ACPI_FUNCTION_TRACE("acpi_load_tables"); | 69 | ACPI_FUNCTION_TRACE(acpi_load_tables); |
| 72 | 70 | ||
| 73 | /* Get the RSDP */ | 71 | /* Get the RSDP */ |
| 74 | 72 | ||
| @@ -123,6 +121,8 @@ acpi_status acpi_load_tables(void) | |||
| 123 | return_ACPI_STATUS(status); | 121 | return_ACPI_STATUS(status); |
| 124 | } | 122 | } |
| 125 | 123 | ||
| 124 | ACPI_EXPORT_SYMBOL(acpi_load_tables) | ||
| 125 | |||
| 126 | #ifdef ACPI_FUTURE_USAGE | 126 | #ifdef ACPI_FUTURE_USAGE |
| 127 | /******************************************************************************* | 127 | /******************************************************************************* |
| 128 | * | 128 | * |
| @@ -139,14 +139,13 @@ acpi_status acpi_load_tables(void) | |||
| 139 | * is determined that the table is invalid, the call will fail. | 139 | * is determined that the table is invalid, the call will fail. |
| 140 | * | 140 | * |
| 141 | ******************************************************************************/ | 141 | ******************************************************************************/ |
| 142 | |||
| 143 | acpi_status acpi_load_table(struct acpi_table_header *table_ptr) | 142 | acpi_status acpi_load_table(struct acpi_table_header *table_ptr) |
| 144 | { | 143 | { |
| 145 | acpi_status status; | 144 | acpi_status status; |
| 146 | struct acpi_table_desc table_info; | 145 | struct acpi_table_desc table_info; |
| 147 | struct acpi_pointer address; | 146 | struct acpi_pointer address; |
| 148 | 147 | ||
| 149 | ACPI_FUNCTION_TRACE("acpi_load_table"); | 148 | ACPI_FUNCTION_TRACE(acpi_load_table); |
| 150 | 149 | ||
| 151 | if (!table_ptr) { | 150 | if (!table_ptr) { |
| 152 | return_ACPI_STATUS(AE_BAD_PARAMETER); | 151 | return_ACPI_STATUS(AE_BAD_PARAMETER); |
| @@ -174,6 +173,7 @@ acpi_status acpi_load_table(struct acpi_table_header *table_ptr) | |||
| 174 | status = acpi_tb_install_table(&table_info); | 173 | status = acpi_tb_install_table(&table_info); |
| 175 | if (ACPI_FAILURE(status)) { | 174 | if (ACPI_FAILURE(status)) { |
| 176 | if (status == AE_ALREADY_EXISTS) { | 175 | if (status == AE_ALREADY_EXISTS) { |
| 176 | |||
| 177 | /* Table already exists, no error */ | 177 | /* Table already exists, no error */ |
| 178 | 178 | ||
| 179 | status = AE_OK; | 179 | status = AE_OK; |
| @@ -188,12 +188,12 @@ acpi_status acpi_load_table(struct acpi_table_header *table_ptr) | |||
| 188 | /* Convert the table to common format if necessary */ | 188 | /* Convert the table to common format if necessary */ |
| 189 | 189 | ||
| 190 | switch (table_info.type) { | 190 | switch (table_info.type) { |
| 191 | case ACPI_TABLE_FADT: | 191 | case ACPI_TABLE_ID_FADT: |
| 192 | 192 | ||
| 193 | status = acpi_tb_convert_table_fadt(); | 193 | status = acpi_tb_convert_table_fadt(); |
| 194 | break; | 194 | break; |
| 195 | 195 | ||
| 196 | case ACPI_TABLE_FACS: | 196 | case ACPI_TABLE_ID_FACS: |
| 197 | 197 | ||
| 198 | status = acpi_tb_build_common_facs(&table_info); | 198 | status = acpi_tb_build_common_facs(&table_info); |
| 199 | break; | 199 | break; |
| @@ -208,6 +208,7 @@ acpi_status acpi_load_table(struct acpi_table_header *table_ptr) | |||
| 208 | } | 208 | } |
| 209 | 209 | ||
| 210 | if (ACPI_FAILURE(status)) { | 210 | if (ACPI_FAILURE(status)) { |
| 211 | |||
| 211 | /* Uninstall table and free the buffer */ | 212 | /* Uninstall table and free the buffer */ |
| 212 | 213 | ||
| 213 | (void)acpi_tb_uninstall_table(table_info.installed_desc); | 214 | (void)acpi_tb_uninstall_table(table_info.installed_desc); |
| @@ -216,6 +217,8 @@ acpi_status acpi_load_table(struct acpi_table_header *table_ptr) | |||
| 216 | return_ACPI_STATUS(status); | 217 | return_ACPI_STATUS(status); |
| 217 | } | 218 | } |
| 218 | 219 | ||
| 220 | ACPI_EXPORT_SYMBOL(acpi_load_table) | ||
| 221 | |||
| 219 | /******************************************************************************* | 222 | /******************************************************************************* |
| 220 | * | 223 | * |
| 221 | * FUNCTION: acpi_unload_table | 224 | * FUNCTION: acpi_unload_table |
| @@ -227,16 +230,15 @@ acpi_status acpi_load_table(struct acpi_table_header *table_ptr) | |||
| 227 | * DESCRIPTION: This routine is used to force the unload of a table | 230 | * DESCRIPTION: This routine is used to force the unload of a table |
| 228 | * | 231 | * |
| 229 | ******************************************************************************/ | 232 | ******************************************************************************/ |
| 230 | |||
| 231 | acpi_status acpi_unload_table(acpi_table_type table_type) | 233 | acpi_status acpi_unload_table(acpi_table_type table_type) |
| 232 | { | 234 | { |
| 233 | struct acpi_table_desc *table_desc; | 235 | struct acpi_table_desc *table_desc; |
| 234 | 236 | ||
| 235 | ACPI_FUNCTION_TRACE("acpi_unload_table"); | 237 | ACPI_FUNCTION_TRACE(acpi_unload_table); |
| 236 | 238 | ||
| 237 | /* Parameter validation */ | 239 | /* Parameter validation */ |
| 238 | 240 | ||
| 239 | if (table_type > ACPI_TABLE_MAX) { | 241 | if (table_type > ACPI_TABLE_ID_MAX) { |
| 240 | return_ACPI_STATUS(AE_BAD_PARAMETER); | 242 | return_ACPI_STATUS(AE_BAD_PARAMETER); |
| 241 | } | 243 | } |
| 242 | 244 | ||
| @@ -261,6 +263,8 @@ acpi_status acpi_unload_table(acpi_table_type table_type) | |||
| 261 | return_ACPI_STATUS(AE_OK); | 263 | return_ACPI_STATUS(AE_OK); |
| 262 | } | 264 | } |
| 263 | 265 | ||
| 266 | ACPI_EXPORT_SYMBOL(acpi_unload_table) | ||
| 267 | |||
| 264 | /******************************************************************************* | 268 | /******************************************************************************* |
| 265 | * | 269 | * |
| 266 | * FUNCTION: acpi_get_table_header | 270 | * FUNCTION: acpi_get_table_header |
| @@ -281,7 +285,6 @@ acpi_status acpi_unload_table(acpi_table_type table_type) | |||
| 281 | * have a standard header and is fixed length. | 285 | * have a standard header and is fixed length. |
| 282 | * | 286 | * |
| 283 | ******************************************************************************/ | 287 | ******************************************************************************/ |
| 284 | |||
| 285 | acpi_status | 288 | acpi_status |
| 286 | acpi_get_table_header(acpi_table_type table_type, | 289 | acpi_get_table_header(acpi_table_type table_type, |
| 287 | u32 instance, struct acpi_table_header *out_table_header) | 290 | u32 instance, struct acpi_table_header *out_table_header) |
| @@ -289,16 +292,16 @@ acpi_get_table_header(acpi_table_type table_type, | |||
| 289 | struct acpi_table_header *tbl_ptr; | 292 | struct acpi_table_header *tbl_ptr; |
| 290 | acpi_status status; | 293 | acpi_status status; |
| 291 | 294 | ||
| 292 | ACPI_FUNCTION_TRACE("acpi_get_table_header"); | 295 | ACPI_FUNCTION_TRACE(acpi_get_table_header); |
| 293 | 296 | ||
| 294 | if ((instance == 0) || | 297 | if ((instance == 0) || |
| 295 | (table_type == ACPI_TABLE_RSDP) || (!out_table_header)) { | 298 | (table_type == ACPI_TABLE_ID_RSDP) || (!out_table_header)) { |
| 296 | return_ACPI_STATUS(AE_BAD_PARAMETER); | 299 | return_ACPI_STATUS(AE_BAD_PARAMETER); |
| 297 | } | 300 | } |
| 298 | 301 | ||
| 299 | /* Check the table type and instance */ | 302 | /* Check the table type and instance */ |
| 300 | 303 | ||
| 301 | if ((table_type > ACPI_TABLE_MAX) || | 304 | if ((table_type > ACPI_TABLE_ID_MAX) || |
| 302 | (ACPI_IS_SINGLE_TABLE(acpi_gbl_table_data[table_type].flags) && | 305 | (ACPI_IS_SINGLE_TABLE(acpi_gbl_table_data[table_type].flags) && |
| 303 | instance > 1)) { | 306 | instance > 1)) { |
| 304 | return_ACPI_STATUS(AE_BAD_PARAMETER); | 307 | return_ACPI_STATUS(AE_BAD_PARAMETER); |
| @@ -325,6 +328,7 @@ acpi_get_table_header(acpi_table_type table_type, | |||
| 325 | return_ACPI_STATUS(status); | 328 | return_ACPI_STATUS(status); |
| 326 | } | 329 | } |
| 327 | 330 | ||
| 331 | ACPI_EXPORT_SYMBOL(acpi_get_table_header) | ||
| 328 | #endif /* ACPI_FUTURE_USAGE */ | 332 | #endif /* ACPI_FUTURE_USAGE */ |
| 329 | 333 | ||
| 330 | /******************************************************************************* | 334 | /******************************************************************************* |
| @@ -349,7 +353,6 @@ acpi_get_table_header(acpi_table_type table_type, | |||
| 349 | * a complete table including the header. | 353 | * a complete table including the header. |
| 350 | * | 354 | * |
| 351 | ******************************************************************************/ | 355 | ******************************************************************************/ |
| 352 | |||
| 353 | acpi_status | 356 | acpi_status |
| 354 | acpi_get_table(acpi_table_type table_type, | 357 | acpi_get_table(acpi_table_type table_type, |
| 355 | u32 instance, struct acpi_buffer *ret_buffer) | 358 | u32 instance, struct acpi_buffer *ret_buffer) |
| @@ -358,7 +361,7 @@ acpi_get_table(acpi_table_type table_type, | |||
| 358 | acpi_status status; | 361 | acpi_status status; |
| 359 | acpi_size table_length; | 362 | acpi_size table_length; |
| 360 | 363 | ||
| 361 | ACPI_FUNCTION_TRACE("acpi_get_table"); | 364 | ACPI_FUNCTION_TRACE(acpi_get_table); |
| 362 | 365 | ||
| 363 | /* Parameter validation */ | 366 | /* Parameter validation */ |
| 364 | 367 | ||
| @@ -373,7 +376,7 @@ acpi_get_table(acpi_table_type table_type, | |||
| 373 | 376 | ||
| 374 | /* Check the table type and instance */ | 377 | /* Check the table type and instance */ |
| 375 | 378 | ||
| 376 | if ((table_type > ACPI_TABLE_MAX) || | 379 | if ((table_type > ACPI_TABLE_ID_MAX) || |
| 377 | (ACPI_IS_SINGLE_TABLE(acpi_gbl_table_data[table_type].flags) && | 380 | (ACPI_IS_SINGLE_TABLE(acpi_gbl_table_data[table_type].flags) && |
| 378 | instance > 1)) { | 381 | instance > 1)) { |
| 379 | return_ACPI_STATUS(AE_BAD_PARAMETER); | 382 | return_ACPI_STATUS(AE_BAD_PARAMETER); |
| @@ -396,7 +399,8 @@ acpi_get_table(acpi_table_type table_type, | |||
| 396 | 399 | ||
| 397 | /* Get the table length */ | 400 | /* Get the table length */ |
| 398 | 401 | ||
| 399 | if (table_type == ACPI_TABLE_RSDP) { | 402 | if (table_type == ACPI_TABLE_ID_RSDP) { |
| 403 | |||
| 400 | /* RSD PTR is the only "table" without a header */ | 404 | /* RSD PTR is the only "table" without a header */ |
| 401 | 405 | ||
| 402 | table_length = sizeof(struct rsdp_descriptor); | 406 | table_length = sizeof(struct rsdp_descriptor); |
| @@ -417,4 +421,4 @@ acpi_get_table(acpi_table_type table_type, | |||
| 417 | return_ACPI_STATUS(AE_OK); | 421 | return_ACPI_STATUS(AE_OK); |
| 418 | } | 422 | } |
| 419 | 423 | ||
| 420 | EXPORT_SYMBOL(acpi_get_table); | 424 | ACPI_EXPORT_SYMBOL(acpi_get_table) |
