nsxfname.c 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662
  1. /******************************************************************************
  2. *
  3. * Module Name: nsxfname - Public interfaces to the ACPI subsystem
  4. * ACPI Namespace oriented interfaces
  5. *
  6. *****************************************************************************/
  7. /*
  8. * Copyright (C) 2000 - 2013, Intel Corp.
  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. #include <linux/export.h>
  44. #include <acpi/acpi.h>
  45. #include "accommon.h"
  46. #include "acnamesp.h"
  47. #include "acparser.h"
  48. #include "amlcode.h"
  49. #define _COMPONENT ACPI_NAMESPACE
  50. ACPI_MODULE_NAME("nsxfname")
  51. /* Local prototypes */
  52. static char *acpi_ns_copy_device_id(struct acpi_pnp_device_id *dest,
  53. struct acpi_pnp_device_id *source,
  54. char *string_area);
  55. /******************************************************************************
  56. *
  57. * FUNCTION: acpi_get_handle
  58. *
  59. * PARAMETERS: parent - Object to search under (search scope).
  60. * pathname - Pointer to an asciiz string containing the
  61. * name
  62. * ret_handle - Where the return handle is returned
  63. *
  64. * RETURN: Status
  65. *
  66. * DESCRIPTION: This routine will search for a caller specified name in the
  67. * name space. The caller can restrict the search region by
  68. * specifying a non NULL parent. The parent value is itself a
  69. * namespace handle.
  70. *
  71. ******************************************************************************/
  72. acpi_status
  73. acpi_get_handle(acpi_handle parent,
  74. acpi_string pathname, acpi_handle * ret_handle)
  75. {
  76. acpi_status status;
  77. struct acpi_namespace_node *node = NULL;
  78. struct acpi_namespace_node *prefix_node = NULL;
  79. ACPI_FUNCTION_ENTRY();
  80. /* Parameter Validation */
  81. if (!ret_handle || !pathname) {
  82. return (AE_BAD_PARAMETER);
  83. }
  84. /* Convert a parent handle to a prefix node */
  85. if (parent) {
  86. prefix_node = acpi_ns_validate_handle(parent);
  87. if (!prefix_node) {
  88. return (AE_BAD_PARAMETER);
  89. }
  90. }
  91. /*
  92. * Valid cases are:
  93. * 1) Fully qualified pathname
  94. * 2) Parent + Relative pathname
  95. *
  96. * Error for <null Parent + relative path>
  97. */
  98. if (ACPI_IS_ROOT_PREFIX(pathname[0])) {
  99. /* Pathname is fully qualified (starts with '\') */
  100. /* Special case for root-only, since we can't search for it */
  101. if (!ACPI_STRCMP(pathname, ACPI_NS_ROOT_PATH)) {
  102. *ret_handle =
  103. ACPI_CAST_PTR(acpi_handle, acpi_gbl_root_node);
  104. return (AE_OK);
  105. }
  106. } else if (!prefix_node) {
  107. /* Relative path with null prefix is disallowed */
  108. return (AE_BAD_PARAMETER);
  109. }
  110. /* Find the Node and convert to a handle */
  111. status =
  112. acpi_ns_get_node(prefix_node, pathname, ACPI_NS_NO_UPSEARCH, &node);
  113. if (ACPI_SUCCESS(status)) {
  114. *ret_handle = ACPI_CAST_PTR(acpi_handle, node);
  115. }
  116. return (status);
  117. }
  118. ACPI_EXPORT_SYMBOL(acpi_get_handle)
  119. /******************************************************************************
  120. *
  121. * FUNCTION: acpi_get_name
  122. *
  123. * PARAMETERS: handle - Handle to be converted to a pathname
  124. * name_type - Full pathname or single segment
  125. * buffer - Buffer for returned path
  126. *
  127. * RETURN: Pointer to a string containing the fully qualified Name.
  128. *
  129. * DESCRIPTION: This routine returns the fully qualified name associated with
  130. * the Handle parameter. This and the acpi_pathname_to_handle are
  131. * complementary functions.
  132. *
  133. ******************************************************************************/
  134. acpi_status
  135. acpi_get_name(acpi_handle handle, u32 name_type, struct acpi_buffer * buffer)
  136. {
  137. acpi_status status;
  138. struct acpi_namespace_node *node;
  139. char *node_name;
  140. /* Parameter validation */
  141. if (name_type > ACPI_NAME_TYPE_MAX) {
  142. return (AE_BAD_PARAMETER);
  143. }
  144. status = acpi_ut_validate_buffer(buffer);
  145. if (ACPI_FAILURE(status)) {
  146. return (status);
  147. }
  148. if (name_type == ACPI_FULL_PATHNAME) {
  149. /* Get the full pathname (From the namespace root) */
  150. status = acpi_ns_handle_to_pathname(handle, buffer);
  151. return (status);
  152. }
  153. /*
  154. * Wants the single segment ACPI name.
  155. * Validate handle and convert to a namespace Node
  156. */
  157. status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE);
  158. if (ACPI_FAILURE(status)) {
  159. return (status);
  160. }
  161. node = acpi_ns_validate_handle(handle);
  162. if (!node) {
  163. status = AE_BAD_PARAMETER;
  164. goto unlock_and_exit;
  165. }
  166. /* Validate/Allocate/Clear caller buffer */
  167. status = acpi_ut_initialize_buffer(buffer, ACPI_PATH_SEGMENT_LENGTH);
  168. if (ACPI_FAILURE(status)) {
  169. goto unlock_and_exit;
  170. }
  171. /* Just copy the ACPI name from the Node and zero terminate it */
  172. node_name = acpi_ut_get_node_name(node);
  173. ACPI_MOVE_NAME(buffer->pointer, node_name);
  174. ((char *)buffer->pointer)[ACPI_NAME_SIZE] = 0;
  175. status = AE_OK;
  176. unlock_and_exit:
  177. (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
  178. return (status);
  179. }
  180. ACPI_EXPORT_SYMBOL(acpi_get_name)
  181. /******************************************************************************
  182. *
  183. * FUNCTION: acpi_ns_copy_device_id
  184. *
  185. * PARAMETERS: dest - Pointer to the destination PNP_DEVICE_ID
  186. * source - Pointer to the source PNP_DEVICE_ID
  187. * string_area - Pointer to where to copy the dest string
  188. *
  189. * RETURN: Pointer to the next string area
  190. *
  191. * DESCRIPTION: Copy a single PNP_DEVICE_ID, including the string data.
  192. *
  193. ******************************************************************************/
  194. static char *acpi_ns_copy_device_id(struct acpi_pnp_device_id *dest,
  195. struct acpi_pnp_device_id *source,
  196. char *string_area)
  197. {
  198. /* Create the destination PNP_DEVICE_ID */
  199. dest->string = string_area;
  200. dest->length = source->length;
  201. /* Copy actual string and return a pointer to the next string area */
  202. ACPI_MEMCPY(string_area, source->string, source->length);
  203. return (string_area + source->length);
  204. }
  205. /******************************************************************************
  206. *
  207. * FUNCTION: acpi_get_object_info
  208. *
  209. * PARAMETERS: handle - Object Handle
  210. * return_buffer - Where the info is returned
  211. *
  212. * RETURN: Status
  213. *
  214. * DESCRIPTION: Returns information about an object as gleaned from the
  215. * namespace node and possibly by running several standard
  216. * control methods (Such as in the case of a device.)
  217. *
  218. * For Device and Processor objects, run the Device _HID, _UID, _CID, _SUB,
  219. * _STA, _ADR, _sx_w, and _sx_d methods.
  220. *
  221. * Note: Allocates the return buffer, must be freed by the caller.
  222. *
  223. ******************************************************************************/
  224. acpi_status
  225. acpi_get_object_info(acpi_handle handle,
  226. struct acpi_device_info **return_buffer)
  227. {
  228. struct acpi_namespace_node *node;
  229. struct acpi_device_info *info;
  230. struct acpi_pnp_device_id_list *cid_list = NULL;
  231. struct acpi_pnp_device_id *hid = NULL;
  232. struct acpi_pnp_device_id *uid = NULL;
  233. struct acpi_pnp_device_id *sub = NULL;
  234. char *next_id_string;
  235. acpi_object_type type;
  236. acpi_name name;
  237. u8 param_count = 0;
  238. u8 valid = 0;
  239. u32 info_size;
  240. u32 i;
  241. acpi_status status;
  242. /* Parameter validation */
  243. if (!handle || !return_buffer) {
  244. return (AE_BAD_PARAMETER);
  245. }
  246. status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE);
  247. if (ACPI_FAILURE(status)) {
  248. return (status);
  249. }
  250. node = acpi_ns_validate_handle(handle);
  251. if (!node) {
  252. (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
  253. return (AE_BAD_PARAMETER);
  254. }
  255. /* Get the namespace node data while the namespace is locked */
  256. info_size = sizeof(struct acpi_device_info);
  257. type = node->type;
  258. name = node->name.integer;
  259. if (node->type == ACPI_TYPE_METHOD) {
  260. param_count = node->object->method.param_count;
  261. }
  262. status = acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
  263. if (ACPI_FAILURE(status)) {
  264. return (status);
  265. }
  266. if ((type == ACPI_TYPE_DEVICE) || (type == ACPI_TYPE_PROCESSOR)) {
  267. /*
  268. * Get extra info for ACPI Device/Processor objects only:
  269. * Run the Device _HID, _UID, _SUB, and _CID methods.
  270. *
  271. * Note: none of these methods are required, so they may or may
  272. * not be present for this device. The Info->Valid bitfield is used
  273. * to indicate which methods were found and run successfully.
  274. */
  275. /* Execute the Device._HID method */
  276. status = acpi_ut_execute_HID(node, &hid);
  277. if (ACPI_SUCCESS(status)) {
  278. info_size += hid->length;
  279. valid |= ACPI_VALID_HID;
  280. }
  281. /* Execute the Device._UID method */
  282. status = acpi_ut_execute_UID(node, &uid);
  283. if (ACPI_SUCCESS(status)) {
  284. info_size += uid->length;
  285. valid |= ACPI_VALID_UID;
  286. }
  287. /* Execute the Device._SUB method */
  288. status = acpi_ut_execute_SUB(node, &sub);
  289. if (ACPI_SUCCESS(status)) {
  290. info_size += sub->length;
  291. valid |= ACPI_VALID_SUB;
  292. }
  293. /* Execute the Device._CID method */
  294. status = acpi_ut_execute_CID(node, &cid_list);
  295. if (ACPI_SUCCESS(status)) {
  296. /* Add size of CID strings and CID pointer array */
  297. info_size +=
  298. (cid_list->list_size -
  299. sizeof(struct acpi_pnp_device_id_list));
  300. valid |= ACPI_VALID_CID;
  301. }
  302. }
  303. /*
  304. * Now that we have the variable-length data, we can allocate the
  305. * return buffer
  306. */
  307. info = ACPI_ALLOCATE_ZEROED(info_size);
  308. if (!info) {
  309. status = AE_NO_MEMORY;
  310. goto cleanup;
  311. }
  312. /* Get the fixed-length data */
  313. if ((type == ACPI_TYPE_DEVICE) || (type == ACPI_TYPE_PROCESSOR)) {
  314. /*
  315. * Get extra info for ACPI Device/Processor objects only:
  316. * Run the _STA, _ADR and, sx_w, and _sx_d methods.
  317. *
  318. * Notes: none of these methods are required, so they may or may
  319. * not be present for this device. The Info->Valid bitfield is used
  320. * to indicate which methods were found and run successfully.
  321. *
  322. * For _STA, if the method does not exist, then (as per the ACPI
  323. * specification), the returned current_status flags will indicate
  324. * that the device is present/functional/enabled. Otherwise, the
  325. * current_status flags reflect the value returned from _STA.
  326. */
  327. /* Execute the Device._STA method */
  328. status = acpi_ut_execute_STA(node, &info->current_status);
  329. if (ACPI_SUCCESS(status)) {
  330. valid |= ACPI_VALID_STA;
  331. }
  332. /* Execute the Device._ADR method */
  333. status = acpi_ut_evaluate_numeric_object(METHOD_NAME__ADR, node,
  334. &info->address);
  335. if (ACPI_SUCCESS(status)) {
  336. valid |= ACPI_VALID_ADR;
  337. }
  338. /* Execute the Device._sx_w methods */
  339. status = acpi_ut_execute_power_methods(node,
  340. acpi_gbl_lowest_dstate_names,
  341. ACPI_NUM_sx_w_METHODS,
  342. info->lowest_dstates);
  343. if (ACPI_SUCCESS(status)) {
  344. valid |= ACPI_VALID_SXWS;
  345. }
  346. /* Execute the Device._sx_d methods */
  347. status = acpi_ut_execute_power_methods(node,
  348. acpi_gbl_highest_dstate_names,
  349. ACPI_NUM_sx_d_METHODS,
  350. info->highest_dstates);
  351. if (ACPI_SUCCESS(status)) {
  352. valid |= ACPI_VALID_SXDS;
  353. }
  354. }
  355. /*
  356. * Create a pointer to the string area of the return buffer.
  357. * Point to the end of the base struct acpi_device_info structure.
  358. */
  359. next_id_string = ACPI_CAST_PTR(char, info->compatible_id_list.ids);
  360. if (cid_list) {
  361. /* Point past the CID PNP_DEVICE_ID array */
  362. next_id_string +=
  363. ((acpi_size) cid_list->count *
  364. sizeof(struct acpi_pnp_device_id));
  365. }
  366. /*
  367. * Copy the HID, UID, SUB, and CIDs to the return buffer.
  368. * The variable-length strings are copied to the reserved area
  369. * at the end of the buffer.
  370. *
  371. * For HID and CID, check if the ID is a PCI Root Bridge.
  372. */
  373. if (hid) {
  374. next_id_string = acpi_ns_copy_device_id(&info->hardware_id,
  375. hid, next_id_string);
  376. if (acpi_ut_is_pci_root_bridge(hid->string)) {
  377. info->flags |= ACPI_PCI_ROOT_BRIDGE;
  378. }
  379. }
  380. if (uid) {
  381. next_id_string = acpi_ns_copy_device_id(&info->unique_id,
  382. uid, next_id_string);
  383. }
  384. if (sub) {
  385. next_id_string = acpi_ns_copy_device_id(&info->subsystem_id,
  386. sub, next_id_string);
  387. }
  388. if (cid_list) {
  389. info->compatible_id_list.count = cid_list->count;
  390. info->compatible_id_list.list_size = cid_list->list_size;
  391. /* Copy each CID */
  392. for (i = 0; i < cid_list->count; i++) {
  393. next_id_string =
  394. acpi_ns_copy_device_id(&info->compatible_id_list.
  395. ids[i], &cid_list->ids[i],
  396. next_id_string);
  397. if (acpi_ut_is_pci_root_bridge(cid_list->ids[i].string)) {
  398. info->flags |= ACPI_PCI_ROOT_BRIDGE;
  399. }
  400. }
  401. }
  402. /* Copy the fixed-length data */
  403. info->info_size = info_size;
  404. info->type = type;
  405. info->name = name;
  406. info->param_count = param_count;
  407. info->valid = valid;
  408. *return_buffer = info;
  409. status = AE_OK;
  410. cleanup:
  411. if (hid) {
  412. ACPI_FREE(hid);
  413. }
  414. if (uid) {
  415. ACPI_FREE(uid);
  416. }
  417. if (sub) {
  418. ACPI_FREE(sub);
  419. }
  420. if (cid_list) {
  421. ACPI_FREE(cid_list);
  422. }
  423. return (status);
  424. }
  425. ACPI_EXPORT_SYMBOL(acpi_get_object_info)
  426. /******************************************************************************
  427. *
  428. * FUNCTION: acpi_install_method
  429. *
  430. * PARAMETERS: buffer - An ACPI table containing one control method
  431. *
  432. * RETURN: Status
  433. *
  434. * DESCRIPTION: Install a control method into the namespace. If the method
  435. * name already exists in the namespace, it is overwritten. The
  436. * input buffer must contain a valid DSDT or SSDT containing a
  437. * single control method.
  438. *
  439. ******************************************************************************/
  440. acpi_status acpi_install_method(u8 *buffer)
  441. {
  442. struct acpi_table_header *table =
  443. ACPI_CAST_PTR(struct acpi_table_header, buffer);
  444. u8 *aml_buffer;
  445. u8 *aml_start;
  446. char *path;
  447. struct acpi_namespace_node *node;
  448. union acpi_operand_object *method_obj;
  449. struct acpi_parse_state parser_state;
  450. u32 aml_length;
  451. u16 opcode;
  452. u8 method_flags;
  453. acpi_status status;
  454. /* Parameter validation */
  455. if (!buffer) {
  456. return (AE_BAD_PARAMETER);
  457. }
  458. /* Table must be a DSDT or SSDT */
  459. if (!ACPI_COMPARE_NAME(table->signature, ACPI_SIG_DSDT) &&
  460. !ACPI_COMPARE_NAME(table->signature, ACPI_SIG_SSDT)) {
  461. return (AE_BAD_HEADER);
  462. }
  463. /* First AML opcode in the table must be a control method */
  464. parser_state.aml = buffer + sizeof(struct acpi_table_header);
  465. opcode = acpi_ps_peek_opcode(&parser_state);
  466. if (opcode != AML_METHOD_OP) {
  467. return (AE_BAD_PARAMETER);
  468. }
  469. /* Extract method information from the raw AML */
  470. parser_state.aml += acpi_ps_get_opcode_size(opcode);
  471. parser_state.pkg_end = acpi_ps_get_next_package_end(&parser_state);
  472. path = acpi_ps_get_next_namestring(&parser_state);
  473. method_flags = *parser_state.aml++;
  474. aml_start = parser_state.aml;
  475. aml_length = ACPI_PTR_DIFF(parser_state.pkg_end, aml_start);
  476. /*
  477. * Allocate resources up-front. We don't want to have to delete a new
  478. * node from the namespace if we cannot allocate memory.
  479. */
  480. aml_buffer = ACPI_ALLOCATE(aml_length);
  481. if (!aml_buffer) {
  482. return (AE_NO_MEMORY);
  483. }
  484. method_obj = acpi_ut_create_internal_object(ACPI_TYPE_METHOD);
  485. if (!method_obj) {
  486. ACPI_FREE(aml_buffer);
  487. return (AE_NO_MEMORY);
  488. }
  489. /* Lock namespace for acpi_ns_lookup, we may be creating a new node */
  490. status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE);
  491. if (ACPI_FAILURE(status)) {
  492. goto error_exit;
  493. }
  494. /* The lookup either returns an existing node or creates a new one */
  495. status =
  496. acpi_ns_lookup(NULL, path, ACPI_TYPE_METHOD, ACPI_IMODE_LOAD_PASS1,
  497. ACPI_NS_DONT_OPEN_SCOPE | ACPI_NS_ERROR_IF_FOUND,
  498. NULL, &node);
  499. (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
  500. if (ACPI_FAILURE(status)) { /* ns_lookup */
  501. if (status != AE_ALREADY_EXISTS) {
  502. goto error_exit;
  503. }
  504. /* Node existed previously, make sure it is a method node */
  505. if (node->type != ACPI_TYPE_METHOD) {
  506. status = AE_TYPE;
  507. goto error_exit;
  508. }
  509. }
  510. /* Copy the method AML to the local buffer */
  511. ACPI_MEMCPY(aml_buffer, aml_start, aml_length);
  512. /* Initialize the method object with the new method's information */
  513. method_obj->method.aml_start = aml_buffer;
  514. method_obj->method.aml_length = aml_length;
  515. method_obj->method.param_count = (u8)
  516. (method_flags & AML_METHOD_ARG_COUNT);
  517. if (method_flags & AML_METHOD_SERIALIZED) {
  518. method_obj->method.info_flags = ACPI_METHOD_SERIALIZED;
  519. method_obj->method.sync_level = (u8)
  520. ((method_flags & AML_METHOD_SYNC_LEVEL) >> 4);
  521. }
  522. /*
  523. * Now that it is complete, we can attach the new method object to
  524. * the method Node (detaches/deletes any existing object)
  525. */
  526. status = acpi_ns_attach_object(node, method_obj, ACPI_TYPE_METHOD);
  527. /*
  528. * Flag indicates AML buffer is dynamic, must be deleted later.
  529. * Must be set only after attach above.
  530. */
  531. node->flags |= ANOBJ_ALLOCATED_BUFFER;
  532. /* Remove local reference to the method object */
  533. acpi_ut_remove_reference(method_obj);
  534. return (status);
  535. error_exit:
  536. ACPI_FREE(aml_buffer);
  537. ACPI_FREE(method_obj);
  538. return (status);
  539. }
  540. ACPI_EXPORT_SYMBOL(acpi_install_method)