nsxfobj.c (193529) | nsxfobj.c (200553) |
---|---|
1/******************************************************************************* 2 * 3 * Module Name: nsxfobj - Public interfaces to the ACPI subsystem 4 * ACPI Object oriented interfaces 5 * 6 ******************************************************************************/ 7 8/****************************************************************************** --- 158 unchanged lines hidden (view full) --- 167 Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE); 168 if (ACPI_FAILURE (Status)) 169 { 170 return (Status); 171 } 172 173 /* Convert and validate the handle */ 174 | 1/******************************************************************************* 2 * 3 * Module Name: nsxfobj - Public interfaces to the ACPI subsystem 4 * ACPI Object oriented interfaces 5 * 6 ******************************************************************************/ 7 8/****************************************************************************** --- 158 unchanged lines hidden (view full) --- 167 Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE); 168 if (ACPI_FAILURE (Status)) 169 { 170 return (Status); 171 } 172 173 /* Convert and validate the handle */ 174 |
175 Node = AcpiNsMapHandleToNode (Handle); | 175 Node = AcpiNsValidateHandle (Handle); |
176 if (!Node) 177 { 178 (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE); 179 return (AE_BAD_PARAMETER); 180 } 181 182 *RetType = Node->Type; 183 --- 44 unchanged lines hidden (view full) --- 228 Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE); 229 if (ACPI_FAILURE (Status)) 230 { 231 return (Status); 232 } 233 234 /* Convert and validate the handle */ 235 | 176 if (!Node) 177 { 178 (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE); 179 return (AE_BAD_PARAMETER); 180 } 181 182 *RetType = Node->Type; 183 --- 44 unchanged lines hidden (view full) --- 228 Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE); 229 if (ACPI_FAILURE (Status)) 230 { 231 return (Status); 232 } 233 234 /* Convert and validate the handle */ 235 |
236 Node = AcpiNsMapHandleToNode (Handle); | 236 Node = AcpiNsValidateHandle (Handle); |
237 if (!Node) 238 { 239 Status = AE_BAD_PARAMETER; 240 goto UnlockAndExit; 241 } 242 243 /* Get the parent entry */ 244 245 ParentNode = AcpiNsGetParentNode (Node); | 237 if (!Node) 238 { 239 Status = AE_BAD_PARAMETER; 240 goto UnlockAndExit; 241 } 242 243 /* Get the parent entry */ 244 245 ParentNode = AcpiNsGetParentNode (Node); |
246 *RetHandle = AcpiNsConvertEntryToHandle (ParentNode); | 246 *RetHandle = ACPI_CAST_PTR (ACPI_HANDLE, ParentNode); |
247 248 /* Return exception if parent is null */ 249 250 if (!ParentNode) 251 { 252 Status = AE_NULL_ENTRY; 253 } 254 --- 52 unchanged lines hidden (view full) --- 307 } 308 309 /* If null handle, use the parent */ 310 311 if (!Child) 312 { 313 /* Start search at the beginning of the specified scope */ 314 | 247 248 /* Return exception if parent is null */ 249 250 if (!ParentNode) 251 { 252 Status = AE_NULL_ENTRY; 253 } 254 --- 52 unchanged lines hidden (view full) --- 307 } 308 309 /* If null handle, use the parent */ 310 311 if (!Child) 312 { 313 /* Start search at the beginning of the specified scope */ 314 |
315 ParentNode = AcpiNsMapHandleToNode (Parent); | 315 ParentNode = AcpiNsValidateHandle (Parent); |
316 if (!ParentNode) 317 { 318 Status = AE_BAD_PARAMETER; 319 goto UnlockAndExit; 320 } 321 } 322 else 323 { 324 /* Non-null handle, ignore the parent */ 325 /* Convert and validate the handle */ 326 | 316 if (!ParentNode) 317 { 318 Status = AE_BAD_PARAMETER; 319 goto UnlockAndExit; 320 } 321 } 322 else 323 { 324 /* Non-null handle, ignore the parent */ 325 /* Convert and validate the handle */ 326 |
327 ChildNode = AcpiNsMapHandleToNode (Child); | 327 ChildNode = AcpiNsValidateHandle (Child); |
328 if (!ChildNode) 329 { 330 Status = AE_BAD_PARAMETER; 331 goto UnlockAndExit; 332 } 333 } 334 335 /* Internal function does the real work */ 336 337 Node = AcpiNsGetNextNodeTyped (Type, ParentNode, ChildNode); 338 if (!Node) 339 { 340 Status = AE_NOT_FOUND; 341 goto UnlockAndExit; 342 } 343 344 if (RetHandle) 345 { | 328 if (!ChildNode) 329 { 330 Status = AE_BAD_PARAMETER; 331 goto UnlockAndExit; 332 } 333 } 334 335 /* Internal function does the real work */ 336 337 Node = AcpiNsGetNextNodeTyped (Type, ParentNode, ChildNode); 338 if (!Node) 339 { 340 Status = AE_NOT_FOUND; 341 goto UnlockAndExit; 342 } 343 344 if (RetHandle) 345 { |
346 *RetHandle = AcpiNsConvertEntryToHandle (Node); | 346 *RetHandle = ACPI_CAST_PTR (ACPI_HANDLE, Node); |
347 } 348 349 350UnlockAndExit: 351 352 (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE); 353 return (Status); 354} 355 356ACPI_EXPORT_SYMBOL (AcpiGetNextObject) 357 | 347 } 348 349 350UnlockAndExit: 351 352 (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE); 353 return (Status); 354} 355 356ACPI_EXPORT_SYMBOL (AcpiGetNextObject) 357 |