aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/tables/tbxface.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@tglx.tec.linutronix.de>2005-07-13 04:45:00 -0400
committerThomas Gleixner <tglx@mtd.linutronix.de>2005-07-13 04:45:00 -0400
commit1b3035b7fcc72b6b36f2a3634dad832eb2453ce8 (patch)
tree728174d72943cc9b981a5843553551df62eddc41 /drivers/acpi/tables/tbxface.c
parenta98a5d04f400ad112e59cadd739dbabf89417e60 (diff)
parentc32511e2718618f0b53479eb36e07439aa363a74 (diff)
Merge with rsync://fileserver/linux
Diffstat (limited to 'drivers/acpi/tables/tbxface.c')
-rw-r--r--drivers/acpi/tables/tbxface.c39
1 files changed, 16 insertions, 23 deletions
diff --git a/drivers/acpi/tables/tbxface.c b/drivers/acpi/tables/tbxface.c
index 7715043461c4..0c0b9085dbeb 100644
--- a/drivers/acpi/tables/tbxface.c
+++ b/drivers/acpi/tables/tbxface.c
@@ -67,7 +67,8 @@
67 ******************************************************************************/ 67 ******************************************************************************/
68 68
69acpi_status 69acpi_status
70acpi_load_tables (void) 70acpi_load_tables (
71 void)
71{ 72{
72 struct acpi_pointer rsdp_address; 73 struct acpi_pointer rsdp_address;
73 acpi_status status; 74 acpi_status status;
@@ -82,7 +83,7 @@ acpi_load_tables (void)
82 &rsdp_address); 83 &rsdp_address);
83 if (ACPI_FAILURE (status)) { 84 if (ACPI_FAILURE (status)) {
84 ACPI_REPORT_ERROR (("acpi_load_tables: Could not get RSDP, %s\n", 85 ACPI_REPORT_ERROR (("acpi_load_tables: Could not get RSDP, %s\n",
85 acpi_format_exception (status))); 86 acpi_format_exception (status)));
86 goto error_exit; 87 goto error_exit;
87 } 88 }
88 89
@@ -93,7 +94,7 @@ acpi_load_tables (void)
93 status = acpi_tb_verify_rsdp (&rsdp_address); 94 status = acpi_tb_verify_rsdp (&rsdp_address);
94 if (ACPI_FAILURE (status)) { 95 if (ACPI_FAILURE (status)) {
95 ACPI_REPORT_ERROR (("acpi_load_tables: RSDP Failed validation: %s\n", 96 ACPI_REPORT_ERROR (("acpi_load_tables: RSDP Failed validation: %s\n",
96 acpi_format_exception (status))); 97 acpi_format_exception (status)));
97 goto error_exit; 98 goto error_exit;
98 } 99 }
99 100
@@ -102,7 +103,7 @@ acpi_load_tables (void)
102 status = acpi_tb_get_table_rsdt (); 103 status = acpi_tb_get_table_rsdt ();
103 if (ACPI_FAILURE (status)) { 104 if (ACPI_FAILURE (status)) {
104 ACPI_REPORT_ERROR (("acpi_load_tables: Could not load RSDT: %s\n", 105 ACPI_REPORT_ERROR (("acpi_load_tables: Could not load RSDT: %s\n",
105 acpi_format_exception (status))); 106 acpi_format_exception (status)));
106 goto error_exit; 107 goto error_exit;
107 } 108 }
108 109
@@ -110,20 +111,20 @@ acpi_load_tables (void)
110 111
111 status = acpi_tb_get_required_tables (); 112 status = acpi_tb_get_required_tables ();
112 if (ACPI_FAILURE (status)) { 113 if (ACPI_FAILURE (status)) {
113 ACPI_REPORT_ERROR (("acpi_load_tables: Error getting required tables (DSDT/FADT/FACS): %s\n", 114 ACPI_REPORT_ERROR ((
114 acpi_format_exception (status))); 115 "acpi_load_tables: Error getting required tables (DSDT/FADT/FACS): %s\n",
116 acpi_format_exception (status)));
115 goto error_exit; 117 goto error_exit;
116 } 118 }
117 119
118 ACPI_DEBUG_PRINT ((ACPI_DB_INIT, "ACPI Tables successfully acquired\n")); 120 ACPI_DEBUG_PRINT ((ACPI_DB_INIT, "ACPI Tables successfully acquired\n"));
119 121
120
121 /* Load the namespace from the tables */ 122 /* Load the namespace from the tables */
122 123
123 status = acpi_ns_load_namespace (); 124 status = acpi_ns_load_namespace ();
124 if (ACPI_FAILURE (status)) { 125 if (ACPI_FAILURE (status)) {
125 ACPI_REPORT_ERROR (("acpi_load_tables: Could not load namespace: %s\n", 126 ACPI_REPORT_ERROR (("acpi_load_tables: Could not load namespace: %s\n",
126 acpi_format_exception (status))); 127 acpi_format_exception (status)));
127 goto error_exit; 128 goto error_exit;
128 } 129 }
129 130
@@ -139,7 +140,6 @@ error_exit:
139 140
140 141
141#ifdef ACPI_FUTURE_USAGE 142#ifdef ACPI_FUTURE_USAGE
142
143/******************************************************************************* 143/*******************************************************************************
144 * 144 *
145 * FUNCTION: acpi_load_table 145 * FUNCTION: acpi_load_table
@@ -250,7 +250,6 @@ acpi_unload_table (
250 return_ACPI_STATUS (AE_BAD_PARAMETER); 250 return_ACPI_STATUS (AE_BAD_PARAMETER);
251 } 251 }
252 252
253
254 /* Find all tables of the requested type */ 253 /* Find all tables of the requested type */
255 254
256 table_desc = acpi_gbl_table_lists[table_type].next; 255 table_desc = acpi_gbl_table_lists[table_type].next;
@@ -321,7 +320,6 @@ acpi_get_table_header (
321 return_ACPI_STATUS (AE_BAD_PARAMETER); 320 return_ACPI_STATUS (AE_BAD_PARAMETER);
322 } 321 }
323 322
324
325 /* Get a pointer to the entire table */ 323 /* Get a pointer to the entire table */
326 324
327 status = acpi_tb_get_table_ptr (table_type, instance, &tbl_ptr); 325 status = acpi_tb_get_table_ptr (table_type, instance, &tbl_ptr);
@@ -329,23 +327,20 @@ acpi_get_table_header (
329 return_ACPI_STATUS (status); 327 return_ACPI_STATUS (status);
330 } 328 }
331 329
332 /* 330 /* The function will return a NULL pointer if the table is not loaded */
333 * The function will return a NULL pointer if the table is not loaded 331
334 */
335 if (tbl_ptr == NULL) { 332 if (tbl_ptr == NULL) {
336 return_ACPI_STATUS (AE_NOT_EXIST); 333 return_ACPI_STATUS (AE_NOT_EXIST);
337 } 334 }
338 335
339 /* 336 /* Copy the header to the caller's buffer */
340 * Copy the header to the caller's buffer 337
341 */
342 ACPI_MEMCPY ((void *) out_table_header, (void *) tbl_ptr, 338 ACPI_MEMCPY ((void *) out_table_header, (void *) tbl_ptr,
343 sizeof (struct acpi_table_header)); 339 sizeof (struct acpi_table_header));
344 340
345 return_ACPI_STATUS (status); 341 return_ACPI_STATUS (status);
346} 342}
347 343
348
349#endif /* ACPI_FUTURE_USAGE */ 344#endif /* ACPI_FUTURE_USAGE */
350 345
351/******************************************************************************* 346/*******************************************************************************
@@ -404,7 +399,6 @@ acpi_get_table (
404 return_ACPI_STATUS (AE_BAD_PARAMETER); 399 return_ACPI_STATUS (AE_BAD_PARAMETER);
405 } 400 }
406 401
407
408 /* Get a pointer to the entire table */ 402 /* Get a pointer to the entire table */
409 403
410 status = acpi_tb_get_table_ptr (table_type, instance, &tbl_ptr); 404 status = acpi_tb_get_table_ptr (table_type, instance, &tbl_ptr);
@@ -423,9 +417,8 @@ acpi_get_table (
423 /* Get the table length */ 417 /* Get the table length */
424 418
425 if (table_type == ACPI_TABLE_RSDP) { 419 if (table_type == ACPI_TABLE_RSDP) {
426 /* 420 /* RSD PTR is the only "table" without a header */
427 * RSD PTR is the only "table" without a header 421
428 */
429 table_length = sizeof (struct rsdp_descriptor); 422 table_length = sizeof (struct rsdp_descriptor);
430 } 423 }
431 else { 424 else {