Author: jkim Date: Fri Jun 1 17:00:33 2012 New Revision: 236408 URL: http://svn.freebsd.org/changeset/base/236408
Log: Execute AcpiLeaveSleepStatePrep() for S1 and reduce code duplication. MFC after: 3 days Modified: head/sys/dev/acpica/acpi.c Modified: head/sys/dev/acpica/acpi.c ============================================================================== --- head/sys/dev/acpica/acpi.c Fri Jun 1 16:30:54 2012 (r236407) +++ head/sys/dev/acpica/acpi.c Fri Jun 1 17:00:33 2012 (r236408) @@ -2746,8 +2746,8 @@ acpi_EnterSleepState(struct acpi_softc * if (sc->acpi_sleep_delay > 0) DELAY(sc->acpi_sleep_delay * 1000000); + intr = intr_disable(); if (state != ACPI_STATE_S1) { - intr = intr_disable(); sleep_result = acpi_sleep_machdep(sc, state); acpi_wakeup_machdep(sc, state, sleep_result, 0); AcpiLeaveSleepStatePrep(state, acpi_sleep_flags); @@ -2763,8 +2763,8 @@ acpi_EnterSleepState(struct acpi_softc * if (state == ACPI_STATE_S4) AcpiEnable(); } else { - intr = intr_disable(); status = AcpiEnterSleepState(state, acpi_sleep_flags); + AcpiLeaveSleepStatePrep(state, acpi_sleep_flags); intr_restore(intr); if (ACPI_FAILURE(status)) { device_printf(sc->acpi_dev, "AcpiEnterSleepState failed - %s\n", _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"