aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/tables/tbinstal.c
diff options
context:
space:
mode:
authorRobert Moore <robert.moore@intel.com>2005-04-18 22:49:35 -0400
committerLen Brown <len.brown@intel.com>2005-07-12 00:08:52 -0400
commit44f6c01242da4e162f28d8e1216a8c7a91174605 (patch)
tree53f724764f1bd9036dfb049a643d198125cc9edc /drivers/acpi/tables/tbinstal.c
parentebb6e1a6122fd6b7c96470cfd4ce0f04150e5084 (diff)
ACPICA 20050408 from Bob Moore
Fixed three cases in the interpreter where an "index" argument to an ASL function was still (internally) 32 bits instead of the required 64 bits. This was the Index argument to the Index, Mid, and Match operators. The "strupr" function is now permanently local (acpi_ut_strupr), since this is not a POSIX-defined function and not present in most kernel-level C libraries. References to the C library strupr function have been removed from the headers. Completed the deployment of static functions/prototypes. All prototypes with the static attribute have been moved from the headers to the owning C file. ACPICA 20050329 from Bob Moore An error is now generated if an attempt is made to create a Buffer Field of length zero (A CreateField with a length operand of zero.) The interpreter now issues a warning whenever executable code at the module level is detected during ACPI table load. This will give some idea of the prevalence of this type of code. Implemented support for references to named objects (other than control methods) within package objects. Enhanced package object output for the debug object. Package objects are now completely dumped, showing all elements. Enhanced miscellaneous object output for the debug object. Any object can now be written to the debug object (for example, a device object can be written, and the type of the object will be displayed.) The "static" qualifier has been added to all local functions across the core subsystem. The number of "long" lines (> 80 chars) within the source has been significantly reduced, by about 1/3. Cleaned up all header files to ensure that all CA/iASL functions are prototyped (even static functions) and the formatting is consistent. Two new header files have been added, acopcode.h and acnames.h. Removed several obsolete functions that were no longer used. Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/tables/tbinstal.c')
-rw-r--r--drivers/acpi/tables/tbinstal.c31
1 files changed, 21 insertions, 10 deletions
diff --git a/drivers/acpi/tables/tbinstal.c b/drivers/acpi/tables/tbinstal.c
index 85d5bb01022c..629b64c8193d 100644
--- a/drivers/acpi/tables/tbinstal.c
+++ b/drivers/acpi/tables/tbinstal.c
@@ -49,6 +49,14 @@
49#define _COMPONENT ACPI_TABLES 49#define _COMPONENT ACPI_TABLES
50 ACPI_MODULE_NAME ("tbinstal") 50 ACPI_MODULE_NAME ("tbinstal")
51 51
52/* Local prototypes */
53
54static acpi_status
55acpi_tb_match_signature (
56 char *signature,
57 struct acpi_table_desc *table_info,
58 u8 search_type);
59
52 60
53/******************************************************************************* 61/*******************************************************************************
54 * 62 *
@@ -56,6 +64,7 @@
56 * 64 *
57 * PARAMETERS: Signature - Table signature to match 65 * PARAMETERS: Signature - Table signature to match
58 * table_info - Return data 66 * table_info - Return data
67 * search_type - Table type to match (primary/secondary)
59 * 68 *
60 * RETURN: Status 69 * RETURN: Status
61 * 70 *
@@ -64,7 +73,7 @@
64 * 73 *
65 ******************************************************************************/ 74 ******************************************************************************/
66 75
67acpi_status 76static acpi_status
68acpi_tb_match_signature ( 77acpi_tb_match_signature (
69 char *signature, 78 char *signature,
70 struct acpi_table_desc *table_info, 79 struct acpi_table_desc *table_info,
@@ -76,9 +85,8 @@ acpi_tb_match_signature (
76 ACPI_FUNCTION_TRACE ("tb_match_signature"); 85 ACPI_FUNCTION_TRACE ("tb_match_signature");
77 86
78 87
79 /* 88 /* Search for a signature match among the known table types */
80 * Search for a signature match among the known table types 89
81 */
82 for (i = 0; i < NUM_ACPI_TABLE_TYPES; i++) { 90 for (i = 0; i < NUM_ACPI_TABLE_TYPES; i++) {
83 if (!(acpi_gbl_table_data[i].flags & search_type)) { 91 if (!(acpi_gbl_table_data[i].flags & search_type)) {
84 continue; 92 continue;
@@ -161,6 +169,7 @@ acpi_tb_install_table (
161 * FUNCTION: acpi_tb_recognize_table 169 * FUNCTION: acpi_tb_recognize_table
162 * 170 *
163 * PARAMETERS: table_info - Return value from acpi_tb_get_table_body 171 * PARAMETERS: table_info - Return value from acpi_tb_get_table_body
172 * search_type - Table type to match (primary/secondary)
164 * 173 *
165 * RETURN: Status 174 * RETURN: Status
166 * 175 *
@@ -203,7 +212,8 @@ acpi_tb_recognize_table (
203 * This can be any one of many valid ACPI tables, it just isn't one of 212 * This can be any one of many valid ACPI tables, it just isn't one of
204 * the tables that is consumed by the core subsystem 213 * the tables that is consumed by the core subsystem
205 */ 214 */
206 status = acpi_tb_match_signature (table_header->signature, table_info, search_type); 215 status = acpi_tb_match_signature (table_header->signature,
216 table_info, search_type);
207 if (ACPI_FAILURE (status)) { 217 if (ACPI_FAILURE (status)) {
208 return_ACPI_STATUS (status); 218 return_ACPI_STATUS (status);
209 } 219 }
@@ -253,9 +263,8 @@ acpi_tb_init_table_descriptor (
253 return_ACPI_STATUS (AE_NO_MEMORY); 263 return_ACPI_STATUS (AE_NO_MEMORY);
254 } 264 }
255 265
256 /* 266 /* Install the table into the global data structure */
257 * Install the table into the global data structure 267
258 */
259 list_head = &acpi_gbl_table_lists[table_type]; 268 list_head = &acpi_gbl_table_lists[table_type];
260 269
261 /* 270 /*
@@ -316,7 +325,8 @@ acpi_tb_init_table_descriptor (
316 table_desc->aml_start = (u8 *) (table_desc->pointer + 1), 325 table_desc->aml_start = (u8 *) (table_desc->pointer + 1),
317 table_desc->aml_length = (u32) (table_desc->length - 326 table_desc->aml_length = (u32) (table_desc->length -
318 (u32) sizeof (struct acpi_table_header)); 327 (u32) sizeof (struct acpi_table_header));
319 table_desc->table_id = acpi_ut_allocate_owner_id (ACPI_OWNER_TYPE_TABLE); 328 table_desc->table_id = acpi_ut_allocate_owner_id (
329 ACPI_OWNER_TYPE_TABLE);
320 table_desc->loaded_into_namespace = FALSE; 330 table_desc->loaded_into_namespace = FALSE;
321 331
322 /* 332 /*
@@ -349,7 +359,8 @@ acpi_tb_init_table_descriptor (
349 ******************************************************************************/ 359 ******************************************************************************/
350 360
351void 361void
352acpi_tb_delete_all_tables (void) 362acpi_tb_delete_all_tables (
363 void)
353{ 364{
354 acpi_table_type type; 365 acpi_table_type type;
355 366