Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /****************************************************************************** |
| 2 | * |
| 3 | * Module Name: uteval - Object evaluation |
| 4 | * |
| 5 | *****************************************************************************/ |
| 6 | |
| 7 | /* |
| 8 | * Copyright (C) 2000 - 2005, R. Byron Moore |
| 9 | * All rights reserved. |
| 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without |
| 12 | * modification, are permitted provided that the following conditions |
| 13 | * are met: |
| 14 | * 1. Redistributions of source code must retain the above copyright |
| 15 | * notice, this list of conditions, and the following disclaimer, |
| 16 | * without modification. |
| 17 | * 2. Redistributions in binary form must reproduce at minimum a disclaimer |
| 18 | * substantially similar to the "NO WARRANTY" disclaimer below |
| 19 | * ("Disclaimer") and any redistribution must be conditioned upon |
| 20 | * including a substantially similar Disclaimer requirement for further |
| 21 | * binary redistribution. |
| 22 | * 3. Neither the names of the above-listed copyright holders nor the names |
| 23 | * of any contributors may be used to endorse or promote products derived |
| 24 | * from this software without specific prior written permission. |
| 25 | * |
| 26 | * Alternatively, this software may be distributed under the terms of the |
| 27 | * GNU General Public License ("GPL") version 2 as published by the Free |
| 28 | * Software Foundation. |
| 29 | * |
| 30 | * NO WARRANTY |
| 31 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 32 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 33 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR |
| 34 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 35 | * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 36 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
| 37 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 38 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, |
| 39 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING |
| 40 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 41 | * POSSIBILITY OF SUCH DAMAGES. |
| 42 | */ |
| 43 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 44 | #include <acpi/acpi.h> |
| 45 | #include <acpi/acnamesp.h> |
| 46 | #include <acpi/acinterp.h> |
| 47 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 48 | #define _COMPONENT ACPI_UTILITIES |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 49 | ACPI_MODULE_NAME("uteval") |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 50 | |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 51 | /* Local prototypes */ |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 52 | static void |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 53 | acpi_ut_copy_id_string(char *destination, char *source, acpi_size max_length); |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 54 | |
| 55 | static acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 56 | acpi_ut_translate_one_cid(union acpi_operand_object *obj_desc, |
| 57 | struct acpi_compatible_id *one_cid); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 58 | |
| 59 | /******************************************************************************* |
| 60 | * |
| 61 | * FUNCTION: acpi_ut_osi_implementation |
| 62 | * |
| 63 | * PARAMETERS: walk_state - Current walk state |
| 64 | * |
| 65 | * RETURN: Status |
| 66 | * |
| 67 | * DESCRIPTION: Implementation of _OSI predefined control method |
| 68 | * Supported = _OSI (String) |
| 69 | * |
| 70 | ******************************************************************************/ |
| 71 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 72 | acpi_status acpi_ut_osi_implementation(struct acpi_walk_state *walk_state) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 73 | { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 74 | union acpi_operand_object *string_desc; |
| 75 | union acpi_operand_object *return_desc; |
| 76 | acpi_native_uint i; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 77 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 78 | ACPI_FUNCTION_TRACE("ut_osi_implementation"); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 79 | |
| 80 | /* Validate the string input argument */ |
| 81 | |
| 82 | string_desc = walk_state->arguments[0].object; |
| 83 | if (!string_desc || (string_desc->common.type != ACPI_TYPE_STRING)) { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 84 | return_ACPI_STATUS(AE_TYPE); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 85 | } |
| 86 | |
| 87 | /* Create a return object (Default value = 0) */ |
| 88 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 89 | return_desc = acpi_ut_create_internal_object(ACPI_TYPE_INTEGER); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 90 | if (!return_desc) { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 91 | return_ACPI_STATUS(AE_NO_MEMORY); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 92 | } |
| 93 | |
| 94 | /* Compare input string to table of supported strings */ |
| 95 | |
| 96 | for (i = 0; i < ACPI_NUM_OSI_STRINGS; i++) { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 97 | if (!ACPI_STRCMP(string_desc->string.pointer, |
Bob Moore | defba1d | 2005-12-16 17:05:00 -0500 | [diff] [blame^] | 98 | ACPI_CAST_PTR(char, |
| 99 | acpi_gbl_valid_osi_strings[i]))) |
| 100 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 101 | /* This string is supported */ |
| 102 | |
| 103 | return_desc->integer.value = 0xFFFFFFFF; |
| 104 | break; |
| 105 | } |
| 106 | } |
| 107 | |
| 108 | walk_state->return_desc = return_desc; |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 109 | return_ACPI_STATUS(AE_CTRL_TERMINATE); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 110 | } |
| 111 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 112 | /******************************************************************************* |
| 113 | * |
| 114 | * FUNCTION: acpi_ut_evaluate_object |
| 115 | * |
| 116 | * PARAMETERS: prefix_node - Starting node |
| 117 | * Path - Path to object from starting node |
| 118 | * expected_return_types - Bitmap of allowed return types |
| 119 | * return_desc - Where a return value is stored |
| 120 | * |
| 121 | * RETURN: Status |
| 122 | * |
| 123 | * DESCRIPTION: Evaluates a namespace object and verifies the type of the |
| 124 | * return object. Common code that simplifies accessing objects |
| 125 | * that have required return objects of fixed types. |
| 126 | * |
| 127 | * NOTE: Internal function, no parameter validation |
| 128 | * |
| 129 | ******************************************************************************/ |
| 130 | |
| 131 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 132 | acpi_ut_evaluate_object(struct acpi_namespace_node *prefix_node, |
| 133 | char *path, |
| 134 | u32 expected_return_btypes, |
| 135 | union acpi_operand_object **return_desc) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 136 | { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 137 | struct acpi_parameter_info info; |
| 138 | acpi_status status; |
| 139 | u32 return_btype; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 140 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 141 | ACPI_FUNCTION_TRACE("ut_evaluate_object"); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 142 | |
| 143 | info.node = prefix_node; |
| 144 | info.parameters = NULL; |
| 145 | info.parameter_type = ACPI_PARAM_ARGS; |
| 146 | |
| 147 | /* Evaluate the object/method */ |
| 148 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 149 | status = acpi_ns_evaluate_relative(path, &info); |
| 150 | if (ACPI_FAILURE(status)) { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 151 | if (status == AE_NOT_FOUND) { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 152 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, |
| 153 | "[%4.4s.%s] was not found\n", |
| 154 | acpi_ut_get_node_name(prefix_node), |
| 155 | path)); |
| 156 | } else { |
| 157 | ACPI_REPORT_METHOD_ERROR("Method execution failed", |
| 158 | prefix_node, path, status); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 159 | } |
| 160 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 161 | return_ACPI_STATUS(status); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 162 | } |
| 163 | |
| 164 | /* Did we get a return object? */ |
| 165 | |
| 166 | if (!info.return_object) { |
| 167 | if (expected_return_btypes) { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 168 | ACPI_REPORT_METHOD_ERROR("No object was returned from", |
| 169 | prefix_node, path, |
| 170 | AE_NOT_EXIST); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 171 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 172 | return_ACPI_STATUS(AE_NOT_EXIST); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 173 | } |
| 174 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 175 | return_ACPI_STATUS(AE_OK); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 176 | } |
| 177 | |
| 178 | /* Map the return object type to the bitmapped type */ |
| 179 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 180 | switch (ACPI_GET_OBJECT_TYPE(info.return_object)) { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 181 | case ACPI_TYPE_INTEGER: |
| 182 | return_btype = ACPI_BTYPE_INTEGER; |
| 183 | break; |
| 184 | |
| 185 | case ACPI_TYPE_BUFFER: |
| 186 | return_btype = ACPI_BTYPE_BUFFER; |
| 187 | break; |
| 188 | |
| 189 | case ACPI_TYPE_STRING: |
| 190 | return_btype = ACPI_BTYPE_STRING; |
| 191 | break; |
| 192 | |
| 193 | case ACPI_TYPE_PACKAGE: |
| 194 | return_btype = ACPI_BTYPE_PACKAGE; |
| 195 | break; |
| 196 | |
| 197 | default: |
| 198 | return_btype = 0; |
| 199 | break; |
| 200 | } |
| 201 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 202 | if ((acpi_gbl_enable_interpreter_slack) && (!expected_return_btypes)) { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 203 | /* |
| 204 | * We received a return object, but one was not expected. This can |
| 205 | * happen frequently if the "implicit return" feature is enabled. |
| 206 | * Just delete the return object and return AE_OK. |
| 207 | */ |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 208 | acpi_ut_remove_reference(info.return_object); |
| 209 | return_ACPI_STATUS(AE_OK); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 210 | } |
| 211 | |
| 212 | /* Is the return object one of the expected types? */ |
| 213 | |
| 214 | if (!(expected_return_btypes & return_btype)) { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 215 | ACPI_REPORT_METHOD_ERROR("Return object type is incorrect", |
| 216 | prefix_node, path, AE_TYPE); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 217 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 218 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, |
| 219 | "Type returned from %s was incorrect: %s, expected Btypes: %X\n", |
| 220 | path, |
| 221 | acpi_ut_get_object_type_name(info. |
| 222 | return_object), |
| 223 | expected_return_btypes)); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 224 | |
| 225 | /* On error exit, we must delete the return object */ |
| 226 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 227 | acpi_ut_remove_reference(info.return_object); |
| 228 | return_ACPI_STATUS(AE_TYPE); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 229 | } |
| 230 | |
| 231 | /* Object type is OK, return it */ |
| 232 | |
| 233 | *return_desc = info.return_object; |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 234 | return_ACPI_STATUS(AE_OK); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 235 | } |
| 236 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 237 | /******************************************************************************* |
| 238 | * |
| 239 | * FUNCTION: acpi_ut_evaluate_numeric_object |
| 240 | * |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 241 | * PARAMETERS: object_name - Object name to be evaluated |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 242 | * device_node - Node for the device |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 243 | * Address - Where the value is returned |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 244 | * |
| 245 | * RETURN: Status |
| 246 | * |
| 247 | * DESCRIPTION: Evaluates a numeric namespace object for a selected device |
| 248 | * and stores result in *Address. |
| 249 | * |
| 250 | * NOTE: Internal function, no parameter validation |
| 251 | * |
| 252 | ******************************************************************************/ |
| 253 | |
| 254 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 255 | acpi_ut_evaluate_numeric_object(char *object_name, |
| 256 | struct acpi_namespace_node *device_node, |
| 257 | acpi_integer * address) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 258 | { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 259 | union acpi_operand_object *obj_desc; |
| 260 | acpi_status status; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 261 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 262 | ACPI_FUNCTION_TRACE("ut_evaluate_numeric_object"); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 263 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 264 | status = acpi_ut_evaluate_object(device_node, object_name, |
| 265 | ACPI_BTYPE_INTEGER, &obj_desc); |
| 266 | if (ACPI_FAILURE(status)) { |
| 267 | return_ACPI_STATUS(status); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 268 | } |
| 269 | |
| 270 | /* Get the returned Integer */ |
| 271 | |
| 272 | *address = obj_desc->integer.value; |
| 273 | |
| 274 | /* On exit, we must delete the return object */ |
| 275 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 276 | acpi_ut_remove_reference(obj_desc); |
| 277 | return_ACPI_STATUS(status); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 278 | } |
| 279 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 280 | /******************************************************************************* |
| 281 | * |
| 282 | * FUNCTION: acpi_ut_copy_id_string |
| 283 | * |
| 284 | * PARAMETERS: Destination - Where to copy the string |
| 285 | * Source - Source string |
| 286 | * max_length - Length of the destination buffer |
| 287 | * |
| 288 | * RETURN: None |
| 289 | * |
| 290 | * DESCRIPTION: Copies an ID string for the _HID, _CID, and _UID methods. |
| 291 | * Performs removal of a leading asterisk if present -- workaround |
| 292 | * for a known issue on a bunch of machines. |
| 293 | * |
| 294 | ******************************************************************************/ |
| 295 | |
| 296 | static void |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 297 | acpi_ut_copy_id_string(char *destination, char *source, acpi_size max_length) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 298 | { |
| 299 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 300 | /* |
| 301 | * Workaround for ID strings that have a leading asterisk. This construct |
| 302 | * is not allowed by the ACPI specification (ID strings must be |
| 303 | * alphanumeric), but enough existing machines have this embedded in their |
| 304 | * ID strings that the following code is useful. |
| 305 | */ |
| 306 | if (*source == '*') { |
| 307 | source++; |
| 308 | } |
| 309 | |
| 310 | /* Do the actual copy */ |
| 311 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 312 | ACPI_STRNCPY(destination, source, max_length); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 313 | } |
| 314 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 315 | /******************************************************************************* |
| 316 | * |
| 317 | * FUNCTION: acpi_ut_execute_HID |
| 318 | * |
| 319 | * PARAMETERS: device_node - Node for the device |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 320 | * Hid - Where the HID is returned |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 321 | * |
| 322 | * RETURN: Status |
| 323 | * |
| 324 | * DESCRIPTION: Executes the _HID control method that returns the hardware |
| 325 | * ID of the device. |
| 326 | * |
| 327 | * NOTE: Internal function, no parameter validation |
| 328 | * |
| 329 | ******************************************************************************/ |
| 330 | |
| 331 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 332 | acpi_ut_execute_HID(struct acpi_namespace_node *device_node, |
| 333 | struct acpi_device_id *hid) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 334 | { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 335 | union acpi_operand_object *obj_desc; |
| 336 | acpi_status status; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 337 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 338 | ACPI_FUNCTION_TRACE("ut_execute_HID"); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 339 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 340 | status = acpi_ut_evaluate_object(device_node, METHOD_NAME__HID, |
| 341 | ACPI_BTYPE_INTEGER | ACPI_BTYPE_STRING, |
| 342 | &obj_desc); |
| 343 | if (ACPI_FAILURE(status)) { |
| 344 | return_ACPI_STATUS(status); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 345 | } |
| 346 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 347 | if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_INTEGER) { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 348 | /* Convert the Numeric HID to string */ |
| 349 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 350 | acpi_ex_eisa_id_to_string((u32) obj_desc->integer.value, |
| 351 | hid->value); |
| 352 | } else { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 353 | /* Copy the String HID from the returned object */ |
| 354 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 355 | acpi_ut_copy_id_string(hid->value, obj_desc->string.pointer, |
| 356 | sizeof(hid->value)); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 357 | } |
| 358 | |
| 359 | /* On exit, we must delete the return object */ |
| 360 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 361 | acpi_ut_remove_reference(obj_desc); |
| 362 | return_ACPI_STATUS(status); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 363 | } |
| 364 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 365 | /******************************************************************************* |
| 366 | * |
| 367 | * FUNCTION: acpi_ut_translate_one_cid |
| 368 | * |
| 369 | * PARAMETERS: obj_desc - _CID object, must be integer or string |
| 370 | * one_cid - Where the CID string is returned |
| 371 | * |
| 372 | * RETURN: Status |
| 373 | * |
| 374 | * DESCRIPTION: Return a numeric or string _CID value as a string. |
| 375 | * (Compatible ID) |
| 376 | * |
| 377 | * NOTE: Assumes a maximum _CID string length of |
| 378 | * ACPI_MAX_CID_LENGTH. |
| 379 | * |
| 380 | ******************************************************************************/ |
| 381 | |
| 382 | static acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 383 | acpi_ut_translate_one_cid(union acpi_operand_object *obj_desc, |
| 384 | struct acpi_compatible_id *one_cid) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 385 | { |
| 386 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 387 | switch (ACPI_GET_OBJECT_TYPE(obj_desc)) { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 388 | case ACPI_TYPE_INTEGER: |
| 389 | |
| 390 | /* Convert the Numeric CID to string */ |
| 391 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 392 | acpi_ex_eisa_id_to_string((u32) obj_desc->integer.value, |
| 393 | one_cid->value); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 394 | return (AE_OK); |
| 395 | |
| 396 | case ACPI_TYPE_STRING: |
| 397 | |
| 398 | if (obj_desc->string.length > ACPI_MAX_CID_LENGTH) { |
| 399 | return (AE_AML_STRING_LIMIT); |
| 400 | } |
| 401 | |
| 402 | /* Copy the String CID from the returned object */ |
| 403 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 404 | acpi_ut_copy_id_string(one_cid->value, obj_desc->string.pointer, |
| 405 | ACPI_MAX_CID_LENGTH); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 406 | return (AE_OK); |
| 407 | |
| 408 | default: |
| 409 | |
| 410 | return (AE_TYPE); |
| 411 | } |
| 412 | } |
| 413 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 414 | /******************************************************************************* |
| 415 | * |
| 416 | * FUNCTION: acpi_ut_execute_CID |
| 417 | * |
| 418 | * PARAMETERS: device_node - Node for the device |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 419 | * return_cid_list - Where the CID list is returned |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 420 | * |
| 421 | * RETURN: Status |
| 422 | * |
| 423 | * DESCRIPTION: Executes the _CID control method that returns one or more |
| 424 | * compatible hardware IDs for the device. |
| 425 | * |
| 426 | * NOTE: Internal function, no parameter validation |
| 427 | * |
| 428 | ******************************************************************************/ |
| 429 | |
| 430 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 431 | acpi_ut_execute_CID(struct acpi_namespace_node * device_node, |
| 432 | struct acpi_compatible_id_list ** return_cid_list) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 433 | { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 434 | union acpi_operand_object *obj_desc; |
| 435 | acpi_status status; |
| 436 | u32 count; |
| 437 | u32 size; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 438 | struct acpi_compatible_id_list *cid_list; |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 439 | acpi_native_uint i; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 440 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 441 | ACPI_FUNCTION_TRACE("ut_execute_CID"); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 442 | |
| 443 | /* Evaluate the _CID method for this device */ |
| 444 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 445 | status = acpi_ut_evaluate_object(device_node, METHOD_NAME__CID, |
| 446 | ACPI_BTYPE_INTEGER | ACPI_BTYPE_STRING |
| 447 | | ACPI_BTYPE_PACKAGE, &obj_desc); |
| 448 | if (ACPI_FAILURE(status)) { |
| 449 | return_ACPI_STATUS(status); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 450 | } |
| 451 | |
| 452 | /* Get the number of _CIDs returned */ |
| 453 | |
| 454 | count = 1; |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 455 | if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_PACKAGE) { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 456 | count = obj_desc->package.count; |
| 457 | } |
| 458 | |
| 459 | /* Allocate a worst-case buffer for the _CIDs */ |
| 460 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 461 | size = (((count - 1) * sizeof(struct acpi_compatible_id)) + |
| 462 | sizeof(struct acpi_compatible_id_list)); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 463 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 464 | cid_list = ACPI_MEM_CALLOCATE((acpi_size) size); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 465 | if (!cid_list) { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 466 | return_ACPI_STATUS(AE_NO_MEMORY); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 467 | } |
| 468 | |
| 469 | /* Init CID list */ |
| 470 | |
| 471 | cid_list->count = count; |
| 472 | cid_list->size = size; |
| 473 | |
| 474 | /* |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 475 | * A _CID can return either a single compatible ID or a package of |
| 476 | * compatible IDs. Each compatible ID can be one of the following: |
| 477 | * 1) Integer (32 bit compressed EISA ID) or |
| 478 | * 2) String (PCI ID format, e.g. "PCI\VEN_vvvv&DEV_dddd&SUBSYS_ssssssss") |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 479 | */ |
| 480 | |
| 481 | /* The _CID object can be either a single CID or a package (list) of CIDs */ |
| 482 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 483 | if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_PACKAGE) { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 484 | /* Translate each package element */ |
| 485 | |
| 486 | for (i = 0; i < count; i++) { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 487 | status = |
| 488 | acpi_ut_translate_one_cid(obj_desc->package. |
| 489 | elements[i], |
| 490 | &cid_list->id[i]); |
| 491 | if (ACPI_FAILURE(status)) { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 492 | break; |
| 493 | } |
| 494 | } |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 495 | } else { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 496 | /* Only one CID, translate to a string */ |
| 497 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 498 | status = acpi_ut_translate_one_cid(obj_desc, cid_list->id); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 499 | } |
| 500 | |
| 501 | /* Cleanup on error */ |
| 502 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 503 | if (ACPI_FAILURE(status)) { |
| 504 | ACPI_MEM_FREE(cid_list); |
| 505 | } else { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 506 | *return_cid_list = cid_list; |
| 507 | } |
| 508 | |
| 509 | /* On exit, we must delete the _CID return object */ |
| 510 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 511 | acpi_ut_remove_reference(obj_desc); |
| 512 | return_ACPI_STATUS(status); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 513 | } |
| 514 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 515 | /******************************************************************************* |
| 516 | * |
| 517 | * FUNCTION: acpi_ut_execute_UID |
| 518 | * |
| 519 | * PARAMETERS: device_node - Node for the device |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 520 | * Uid - Where the UID is returned |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 521 | * |
| 522 | * RETURN: Status |
| 523 | * |
| 524 | * DESCRIPTION: Executes the _UID control method that returns the hardware |
| 525 | * ID of the device. |
| 526 | * |
| 527 | * NOTE: Internal function, no parameter validation |
| 528 | * |
| 529 | ******************************************************************************/ |
| 530 | |
| 531 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 532 | acpi_ut_execute_UID(struct acpi_namespace_node *device_node, |
| 533 | struct acpi_device_id *uid) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 534 | { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 535 | union acpi_operand_object *obj_desc; |
| 536 | acpi_status status; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 537 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 538 | ACPI_FUNCTION_TRACE("ut_execute_UID"); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 539 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 540 | status = acpi_ut_evaluate_object(device_node, METHOD_NAME__UID, |
| 541 | ACPI_BTYPE_INTEGER | ACPI_BTYPE_STRING, |
| 542 | &obj_desc); |
| 543 | if (ACPI_FAILURE(status)) { |
| 544 | return_ACPI_STATUS(status); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 545 | } |
| 546 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 547 | if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_INTEGER) { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 548 | /* Convert the Numeric UID to string */ |
| 549 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 550 | acpi_ex_unsigned_integer_to_string(obj_desc->integer.value, |
| 551 | uid->value); |
| 552 | } else { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 553 | /* Copy the String UID from the returned object */ |
| 554 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 555 | acpi_ut_copy_id_string(uid->value, obj_desc->string.pointer, |
| 556 | sizeof(uid->value)); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 557 | } |
| 558 | |
| 559 | /* On exit, we must delete the return object */ |
| 560 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 561 | acpi_ut_remove_reference(obj_desc); |
| 562 | return_ACPI_STATUS(status); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 563 | } |
| 564 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 565 | /******************************************************************************* |
| 566 | * |
| 567 | * FUNCTION: acpi_ut_execute_STA |
| 568 | * |
| 569 | * PARAMETERS: device_node - Node for the device |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 570 | * Flags - Where the status flags are returned |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 571 | * |
| 572 | * RETURN: Status |
| 573 | * |
| 574 | * DESCRIPTION: Executes _STA for selected device and stores results in |
| 575 | * *Flags. |
| 576 | * |
| 577 | * NOTE: Internal function, no parameter validation |
| 578 | * |
| 579 | ******************************************************************************/ |
| 580 | |
| 581 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 582 | acpi_ut_execute_STA(struct acpi_namespace_node *device_node, u32 * flags) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 583 | { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 584 | union acpi_operand_object *obj_desc; |
| 585 | acpi_status status; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 586 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 587 | ACPI_FUNCTION_TRACE("ut_execute_STA"); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 588 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 589 | status = acpi_ut_evaluate_object(device_node, METHOD_NAME__STA, |
| 590 | ACPI_BTYPE_INTEGER, &obj_desc); |
| 591 | if (ACPI_FAILURE(status)) { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 592 | if (AE_NOT_FOUND == status) { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 593 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, |
| 594 | "_STA on %4.4s was not found, assuming device is present\n", |
| 595 | acpi_ut_get_node_name(device_node))); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 596 | |
Bob Moore | defba1d | 2005-12-16 17:05:00 -0500 | [diff] [blame^] | 597 | *flags = ACPI_UINT32_MAX; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 598 | status = AE_OK; |
| 599 | } |
| 600 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 601 | return_ACPI_STATUS(status); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 602 | } |
| 603 | |
| 604 | /* Extract the status flags */ |
| 605 | |
| 606 | *flags = (u32) obj_desc->integer.value; |
| 607 | |
| 608 | /* On exit, we must delete the return object */ |
| 609 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 610 | acpi_ut_remove_reference(obj_desc); |
| 611 | return_ACPI_STATUS(status); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 612 | } |
| 613 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 614 | /******************************************************************************* |
| 615 | * |
| 616 | * FUNCTION: acpi_ut_execute_Sxds |
| 617 | * |
| 618 | * PARAMETERS: device_node - Node for the device |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 619 | * Flags - Where the status flags are returned |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 620 | * |
| 621 | * RETURN: Status |
| 622 | * |
| 623 | * DESCRIPTION: Executes _STA for selected device and stores results in |
| 624 | * *Flags. |
| 625 | * |
| 626 | * NOTE: Internal function, no parameter validation |
| 627 | * |
| 628 | ******************************************************************************/ |
| 629 | |
| 630 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 631 | acpi_ut_execute_sxds(struct acpi_namespace_node *device_node, u8 * highest) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 632 | { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 633 | union acpi_operand_object *obj_desc; |
| 634 | acpi_status status; |
| 635 | u32 i; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 636 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 637 | ACPI_FUNCTION_TRACE("ut_execute_Sxds"); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 638 | |
| 639 | for (i = 0; i < 4; i++) { |
| 640 | highest[i] = 0xFF; |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 641 | status = acpi_ut_evaluate_object(device_node, |
Bob Moore | defba1d | 2005-12-16 17:05:00 -0500 | [diff] [blame^] | 642 | ACPI_CAST_PTR(char, |
| 643 | acpi_gbl_highest_dstate_names |
| 644 | [i]), |
| 645 | ACPI_BTYPE_INTEGER, &obj_desc); |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 646 | if (ACPI_FAILURE(status)) { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 647 | if (status != AE_NOT_FOUND) { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 648 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, |
| 649 | "%s on Device %4.4s, %s\n", |
Bob Moore | defba1d | 2005-12-16 17:05:00 -0500 | [diff] [blame^] | 650 | ACPI_CAST_PTR(char, |
| 651 | acpi_gbl_highest_dstate_names |
| 652 | [i]), |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 653 | acpi_ut_get_node_name |
| 654 | (device_node), |
| 655 | acpi_format_exception |
| 656 | (status))); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 657 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 658 | return_ACPI_STATUS(status); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 659 | } |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 660 | } else { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 661 | /* Extract the Dstate value */ |
| 662 | |
| 663 | highest[i] = (u8) obj_desc->integer.value; |
| 664 | |
| 665 | /* Delete the return object */ |
| 666 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 667 | acpi_ut_remove_reference(obj_desc); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 668 | } |
| 669 | } |
| 670 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 671 | return_ACPI_STATUS(AE_OK); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 672 | } |