Deleted Added
full compact
4c4
< * $Revision: 56 $
---
> * $Revision: 57 $
670c670
< * DESCRIPTION: free memory allocated for table storage.
---
> * DESCRIPTION: Disable events and free memory allocated for table storage.
683,686d682
< /*
< * Disable all event-related functionality.
< * In all cases, on error, print a message but obviously we don't abort.
< */
688,691c684
< /*
< * Disable all fixed events
< */
< for (i = 0; i < ACPI_NUM_FIXED_EVENTS; i++)
---
> if (AcpiGbl_EventsInitialized)
693,694c686,694
< Status = AcpiDisableEvent(i, ACPI_EVENT_FIXED, 0);
< if (ACPI_FAILURE (Status))
---
> /*
> * Disable all event-related functionality.
> * In all cases, on error, print a message but obviously we don't abort.
> */
>
> /*
> * Disable all fixed events
> */
> for (i = 0; i < ACPI_NUM_FIXED_EVENTS; i++)
696c696,700
< ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Failed to disable fixed event %d.\n", i));
---
> Status = AcpiDisableEvent(i, ACPI_EVENT_FIXED, 0);
> if (ACPI_FAILURE (Status))
> {
> ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not disable fixed event %d\n", i));
> }
698d701
< }
700,705c703,706
< /*
< * Disable all GPEs
< */
< for (i = 0; i < AcpiGbl_GpeNumberMax; i++)
< {
< if (AcpiEvGetGpeNumberIndex(i) != ACPI_GPE_INVALID)
---
> /*
> * Disable all GPEs
> */
> for (i = 0; i < AcpiGbl_GpeNumberMax; i++)
707,708c708
< Status = AcpiHwDisableGpe(i);
< if (ACPI_FAILURE (Status))
---
> if (AcpiEvGetGpeNumberIndex(i) != ACPI_GPE_INVALID)
710c710,714
< ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Failed to disable GPE %d.\n", i));
---
> Status = AcpiHwDisableGpe(i);
> if (ACPI_FAILURE (Status))
> {
> ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not disable GPE %d\n", i));
> }
713d716
< }
715,721c718,725
< /*
< * Remove SCI handler
< */
< Status = AcpiEvRemoveSciHandler();
< if (ACPI_FAILURE(Status))
< {
< ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Unable to remove SCI handler.\n"));
---
> /*
> * Remove SCI handler
> */
> Status = AcpiEvRemoveSciHandler();
> if (ACPI_FAILURE(Status))
> {
> ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not remove SCI handler\n"));
> }
732c736
< ACPI_DEBUG_PRINT ((ACPI_DB_WARN, "AcpiDisable failed.\n"));
---
> ACPI_DEBUG_PRINT ((ACPI_DB_WARN, "AcpiDisable failed\n"));