acpi_status acpi_ut_initialize_interfaces(void)
{
+ acpi_status status;
u32 i;
- (void)acpi_os_acquire_mutex(acpi_gbl_osi_mutex, ACPI_WAIT_FOREVER);
+ status = acpi_os_acquire_mutex(acpi_gbl_osi_mutex, ACPI_WAIT_FOREVER);
+ if (ACPI_FAILURE(status)) {
+ return (status);
+ }
+
acpi_gbl_supported_interfaces = acpi_default_supported_interfaces;
/* Link the static list of supported interfaces */
*
* PARAMETERS: None
*
- * RETURN: None
+ * RETURN: Status
*
* DESCRIPTION: Delete all interfaces in the global list. Sets
* acpi_gbl_supported_interfaces to NULL.
*
******************************************************************************/
-void acpi_ut_interface_terminate(void)
+acpi_status acpi_ut_interface_terminate(void)
{
+ acpi_status status;
struct acpi_interface_info *next_interface;
- (void)acpi_os_acquire_mutex(acpi_gbl_osi_mutex, ACPI_WAIT_FOREVER);
- next_interface = acpi_gbl_supported_interfaces;
+ status = acpi_os_acquire_mutex(acpi_gbl_osi_mutex, ACPI_WAIT_FOREVER);
+ if (ACPI_FAILURE(status)) {
+ return (status);
+ }
+ next_interface = acpi_gbl_supported_interfaces;
while (next_interface) {
acpi_gbl_supported_interfaces = next_interface->next;
}
acpi_os_release_mutex(acpi_gbl_osi_mutex);
+ return (AE_OK);
}
/*******************************************************************************
union acpi_operand_object *return_desc;
struct acpi_interface_info *interface_info;
acpi_interface_handler interface_handler;
+ acpi_status status;
u32 return_value;
ACPI_FUNCTION_TRACE(ut_osi_implementation);
/* Default return value is 0, NOT SUPPORTED */
return_value = 0;
- (void)acpi_os_acquire_mutex(acpi_gbl_osi_mutex, ACPI_WAIT_FOREVER);
+ status = acpi_os_acquire_mutex(acpi_gbl_osi_mutex, ACPI_WAIT_FOREVER);
+ if (ACPI_FAILURE(status)) {
+ return (status);
+ }
/* Lookup the interface in the global _OSI list */
return (AE_BAD_PARAMETER);
}
- (void)acpi_os_acquire_mutex(acpi_gbl_osi_mutex, ACPI_WAIT_FOREVER);
+ status = acpi_os_acquire_mutex(acpi_gbl_osi_mutex, ACPI_WAIT_FOREVER);
+ if (ACPI_FAILURE(status)) {
+ return (status);
+ }
/* Check if the interface name is already in the global list */
return (AE_BAD_PARAMETER);
}
- (void)acpi_os_acquire_mutex(acpi_gbl_osi_mutex, ACPI_WAIT_FOREVER);
+ status = acpi_os_acquire_mutex(acpi_gbl_osi_mutex, ACPI_WAIT_FOREVER);
+ if (ACPI_FAILURE(status)) {
+ return (status);
+ }
status = acpi_ut_remove_interface(interface_name);
****************************************************************************/
acpi_status acpi_install_interface_handler(acpi_interface_handler handler)
{
- acpi_status status = AE_OK;
+ acpi_status status;
- (void)acpi_os_acquire_mutex(acpi_gbl_osi_mutex, ACPI_WAIT_FOREVER);
+ status = acpi_os_acquire_mutex(acpi_gbl_osi_mutex, ACPI_WAIT_FOREVER);
+ if (ACPI_FAILURE(status)) {
+ return (status);
+ }
if (handler && acpi_gbl_interface_handler) {
status = AE_ALREADY_EXISTS;