Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 1 | /******************************************************************************* |
| 2 | * |
| 3 | * Module Name: utstate - state object support procedures |
| 4 | * |
| 5 | ******************************************************************************/ |
| 6 | |
| 7 | /* |
Bob Moore | 7735ca0 | 2017-02-08 11:00:08 +0800 | [diff] [blame] | 8 | * Copyright (C) 2000 - 2017, Intel Corp. |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 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 | |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 44 | #include <acpi/acpi.h> |
Len Brown | e2f7a77 | 2009-01-09 00:30:03 -0500 | [diff] [blame] | 45 | #include "accommon.h" |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 46 | |
| 47 | #define _COMPONENT ACPI_UTILITIES |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 48 | ACPI_MODULE_NAME("utstate") |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 49 | |
| 50 | /******************************************************************************* |
| 51 | * |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 52 | * FUNCTION: acpi_ut_push_generic_state |
| 53 | * |
| 54 | * PARAMETERS: list_head - Head of the state stack |
Bob Moore | ba494be | 2012-07-12 09:40:10 +0800 | [diff] [blame] | 55 | * state - State object to push |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 56 | * |
| 57 | * RETURN: None |
| 58 | * |
| 59 | * DESCRIPTION: Push a state object onto a state stack |
| 60 | * |
| 61 | ******************************************************************************/ |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 62 | void |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 63 | acpi_ut_push_generic_state(union acpi_generic_state **list_head, |
| 64 | union acpi_generic_state *state) |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 65 | { |
Bob Moore | 0e770b3 | 2012-12-19 05:37:59 +0000 | [diff] [blame] | 66 | ACPI_FUNCTION_ENTRY(); |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 67 | |
| 68 | /* Push the state object onto the front of the list (stack) */ |
| 69 | |
| 70 | state->common.next = *list_head; |
| 71 | *list_head = state; |
Bob Moore | 0e770b3 | 2012-12-19 05:37:59 +0000 | [diff] [blame] | 72 | return; |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 73 | } |
| 74 | |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 75 | /******************************************************************************* |
| 76 | * |
| 77 | * FUNCTION: acpi_ut_pop_generic_state |
| 78 | * |
| 79 | * PARAMETERS: list_head - Head of the state stack |
| 80 | * |
| 81 | * RETURN: The popped state object |
| 82 | * |
| 83 | * DESCRIPTION: Pop a state object from a state stack |
| 84 | * |
| 85 | ******************************************************************************/ |
| 86 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 87 | union acpi_generic_state *acpi_ut_pop_generic_state(union acpi_generic_state |
| 88 | **list_head) |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 89 | { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 90 | union acpi_generic_state *state; |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 91 | |
Bob Moore | 0e770b3 | 2012-12-19 05:37:59 +0000 | [diff] [blame] | 92 | ACPI_FUNCTION_ENTRY(); |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 93 | |
| 94 | /* Remove the state object at the head of the list (stack) */ |
| 95 | |
| 96 | state = *list_head; |
| 97 | if (state) { |
Bob Moore | 52fc0b0 | 2006-10-02 00:00:00 -0400 | [diff] [blame] | 98 | |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 99 | /* Update the list head */ |
| 100 | |
| 101 | *list_head = state->common.next; |
| 102 | } |
| 103 | |
Bob Moore | 0e770b3 | 2012-12-19 05:37:59 +0000 | [diff] [blame] | 104 | return (state); |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 105 | } |
| 106 | |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 107 | /******************************************************************************* |
| 108 | * |
| 109 | * FUNCTION: acpi_ut_create_generic_state |
| 110 | * |
| 111 | * PARAMETERS: None |
| 112 | * |
| 113 | * RETURN: The new state object. NULL on failure. |
| 114 | * |
Bob Moore | 73a3090 | 2012-10-31 02:26:55 +0000 | [diff] [blame] | 115 | * DESCRIPTION: Create a generic state object. Attempt to obtain one from |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 116 | * the global state cache; If none available, create a new one. |
| 117 | * |
| 118 | ******************************************************************************/ |
| 119 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 120 | union acpi_generic_state *acpi_ut_create_generic_state(void) |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 121 | { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 122 | union acpi_generic_state *state; |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 123 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 124 | ACPI_FUNCTION_ENTRY(); |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 125 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 126 | state = acpi_os_acquire_object(acpi_gbl_state_cache); |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 127 | if (state) { |
Bob Moore | 52fc0b0 | 2006-10-02 00:00:00 -0400 | [diff] [blame] | 128 | |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 129 | /* Initialize */ |
Bob Moore | 61686124 | 2006-03-17 16:44:00 -0500 | [diff] [blame] | 130 | state->common.descriptor_type = ACPI_DESC_TYPE_STATE; |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 131 | } |
| 132 | |
| 133 | return (state); |
| 134 | } |
| 135 | |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 136 | /******************************************************************************* |
| 137 | * |
| 138 | * FUNCTION: acpi_ut_create_thread_state |
| 139 | * |
| 140 | * PARAMETERS: None |
| 141 | * |
| 142 | * RETURN: New Thread State. NULL on failure |
| 143 | * |
| 144 | * DESCRIPTION: Create a "Thread State" - a flavor of the generic state used |
| 145 | * to track per-thread info during method execution |
| 146 | * |
| 147 | ******************************************************************************/ |
| 148 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 149 | struct acpi_thread_state *acpi_ut_create_thread_state(void) |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 150 | { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 151 | union acpi_generic_state *state; |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 152 | |
Bob Moore | 0e770b3 | 2012-12-19 05:37:59 +0000 | [diff] [blame] | 153 | ACPI_FUNCTION_ENTRY(); |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 154 | |
| 155 | /* Create the generic state object */ |
| 156 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 157 | state = acpi_ut_create_generic_state(); |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 158 | if (!state) { |
Bob Moore | 0e770b3 | 2012-12-19 05:37:59 +0000 | [diff] [blame] | 159 | return (NULL); |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 160 | } |
| 161 | |
| 162 | /* Init fields specific to the update struct */ |
| 163 | |
Bob Moore | 61686124 | 2006-03-17 16:44:00 -0500 | [diff] [blame] | 164 | state->common.descriptor_type = ACPI_DESC_TYPE_STATE_THREAD; |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 165 | state->thread.thread_id = acpi_os_get_thread_id(); |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 166 | |
Bob Moore | f6dd922 | 2006-07-07 20:44:38 -0400 | [diff] [blame] | 167 | /* Check for invalid thread ID - zero is very bad, it will break things */ |
| 168 | |
| 169 | if (!state->thread.thread_id) { |
| 170 | ACPI_ERROR((AE_INFO, "Invalid zero ID from AcpiOsGetThreadId")); |
| 171 | state->thread.thread_id = (acpi_thread_id) 1; |
| 172 | } |
| 173 | |
Bob Moore | 0e770b3 | 2012-12-19 05:37:59 +0000 | [diff] [blame] | 174 | return ((struct acpi_thread_state *)state); |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 175 | } |
| 176 | |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 177 | /******************************************************************************* |
| 178 | * |
| 179 | * FUNCTION: acpi_ut_create_update_state |
| 180 | * |
Bob Moore | ba494be | 2012-07-12 09:40:10 +0800 | [diff] [blame] | 181 | * PARAMETERS: object - Initial Object to be installed in the state |
| 182 | * action - Update action to be performed |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 183 | * |
| 184 | * RETURN: New state object, null on failure |
| 185 | * |
| 186 | * DESCRIPTION: Create an "Update State" - a flavor of the generic state used |
| 187 | * to update reference counts and delete complex objects such |
| 188 | * as packages. |
| 189 | * |
| 190 | ******************************************************************************/ |
| 191 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 192 | union acpi_generic_state *acpi_ut_create_update_state(union acpi_operand_object |
| 193 | *object, u16 action) |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 194 | { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 195 | union acpi_generic_state *state; |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 196 | |
Bob Moore | 0e770b3 | 2012-12-19 05:37:59 +0000 | [diff] [blame] | 197 | ACPI_FUNCTION_ENTRY(); |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 198 | |
| 199 | /* Create the generic state object */ |
| 200 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 201 | state = acpi_ut_create_generic_state(); |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 202 | if (!state) { |
Bob Moore | 0e770b3 | 2012-12-19 05:37:59 +0000 | [diff] [blame] | 203 | return (NULL); |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 204 | } |
| 205 | |
| 206 | /* Init fields specific to the update struct */ |
| 207 | |
Bob Moore | 61686124 | 2006-03-17 16:44:00 -0500 | [diff] [blame] | 208 | state->common.descriptor_type = ACPI_DESC_TYPE_STATE_UPDATE; |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 209 | state->update.object = object; |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 210 | state->update.value = action; |
Bob Moore | 0e770b3 | 2012-12-19 05:37:59 +0000 | [diff] [blame] | 211 | return (state); |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 212 | } |
| 213 | |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 214 | /******************************************************************************* |
| 215 | * |
| 216 | * FUNCTION: acpi_ut_create_pkg_state |
| 217 | * |
Bob Moore | ba494be | 2012-07-12 09:40:10 +0800 | [diff] [blame] | 218 | * PARAMETERS: object - Initial Object to be installed in the state |
| 219 | * action - Update action to be performed |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 220 | * |
| 221 | * RETURN: New state object, null on failure |
| 222 | * |
| 223 | * DESCRIPTION: Create a "Package State" |
| 224 | * |
| 225 | ******************************************************************************/ |
| 226 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 227 | union acpi_generic_state *acpi_ut_create_pkg_state(void *internal_object, |
| 228 | void *external_object, |
Bob Moore | a62a711 | 2017-08-03 14:27:22 +0800 | [diff] [blame^] | 229 | u32 index) |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 230 | { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 231 | union acpi_generic_state *state; |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 232 | |
Bob Moore | 0e770b3 | 2012-12-19 05:37:59 +0000 | [diff] [blame] | 233 | ACPI_FUNCTION_ENTRY(); |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 234 | |
| 235 | /* Create the generic state object */ |
| 236 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 237 | state = acpi_ut_create_generic_state(); |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 238 | if (!state) { |
Bob Moore | 0e770b3 | 2012-12-19 05:37:59 +0000 | [diff] [blame] | 239 | return (NULL); |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 240 | } |
| 241 | |
| 242 | /* Init fields specific to the update struct */ |
| 243 | |
Bob Moore | 61686124 | 2006-03-17 16:44:00 -0500 | [diff] [blame] | 244 | state->common.descriptor_type = ACPI_DESC_TYPE_STATE_PACKAGE; |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 245 | state->pkg.source_object = (union acpi_operand_object *)internal_object; |
| 246 | state->pkg.dest_object = external_object; |
| 247 | state->pkg.index = index; |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 248 | state->pkg.num_packages = 1; |
Bob Moore | 1fad873 | 2015-12-29 13:54:36 +0800 | [diff] [blame] | 249 | |
Bob Moore | 0e770b3 | 2012-12-19 05:37:59 +0000 | [diff] [blame] | 250 | return (state); |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 251 | } |
| 252 | |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 253 | /******************************************************************************* |
| 254 | * |
| 255 | * FUNCTION: acpi_ut_create_control_state |
| 256 | * |
| 257 | * PARAMETERS: None |
| 258 | * |
| 259 | * RETURN: New state object, null on failure |
| 260 | * |
| 261 | * DESCRIPTION: Create a "Control State" - a flavor of the generic state used |
| 262 | * to support nested IF/WHILE constructs in the AML. |
| 263 | * |
| 264 | ******************************************************************************/ |
| 265 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 266 | union acpi_generic_state *acpi_ut_create_control_state(void) |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 267 | { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 268 | union acpi_generic_state *state; |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 269 | |
Bob Moore | 0e770b3 | 2012-12-19 05:37:59 +0000 | [diff] [blame] | 270 | ACPI_FUNCTION_ENTRY(); |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 271 | |
| 272 | /* Create the generic state object */ |
| 273 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 274 | state = acpi_ut_create_generic_state(); |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 275 | if (!state) { |
Bob Moore | 0e770b3 | 2012-12-19 05:37:59 +0000 | [diff] [blame] | 276 | return (NULL); |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 277 | } |
| 278 | |
| 279 | /* Init fields specific to the control struct */ |
| 280 | |
Bob Moore | 61686124 | 2006-03-17 16:44:00 -0500 | [diff] [blame] | 281 | state->common.descriptor_type = ACPI_DESC_TYPE_STATE_CONTROL; |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 282 | state->common.state = ACPI_CONTROL_CONDITIONAL_EXECUTING; |
Bob Moore | 1fad873 | 2015-12-29 13:54:36 +0800 | [diff] [blame] | 283 | |
Bob Moore | 0e770b3 | 2012-12-19 05:37:59 +0000 | [diff] [blame] | 284 | return (state); |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 285 | } |
| 286 | |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 287 | /******************************************************************************* |
| 288 | * |
| 289 | * FUNCTION: acpi_ut_delete_generic_state |
| 290 | * |
Bob Moore | ba494be | 2012-07-12 09:40:10 +0800 | [diff] [blame] | 291 | * PARAMETERS: state - The state object to be deleted |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 292 | * |
| 293 | * RETURN: None |
| 294 | * |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 295 | * DESCRIPTION: Release a state object to the state cache. NULL state objects |
| 296 | * are ignored. |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 297 | * |
| 298 | ******************************************************************************/ |
| 299 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 300 | void acpi_ut_delete_generic_state(union acpi_generic_state *state) |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 301 | { |
Bob Moore | 0e770b3 | 2012-12-19 05:37:59 +0000 | [diff] [blame] | 302 | ACPI_FUNCTION_ENTRY(); |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 303 | |
Bob Moore | 793c238 | 2006-03-31 00:00:00 -0500 | [diff] [blame] | 304 | /* Ignore null state */ |
| 305 | |
| 306 | if (state) { |
| 307 | (void)acpi_os_release_object(acpi_gbl_state_cache, state); |
| 308 | } |
Bob Moore | 1fad873 | 2015-12-29 13:54:36 +0800 | [diff] [blame] | 309 | |
Bob Moore | 0e770b3 | 2012-12-19 05:37:59 +0000 | [diff] [blame] | 310 | return; |
Robert Moore | 73459f7 | 2005-06-24 00:00:00 -0400 | [diff] [blame] | 311 | } |