From owner-svn-src-all@FreeBSD.ORG Fri Jun 1 17:00:34 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7E664106564A; Fri, 1 Jun 2012 17:00:34 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6A4D88FC22; Fri, 1 Jun 2012 17:00:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q51H0YmH031388; Fri, 1 Jun 2012 17:00:34 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q51H0YTU031386; Fri, 1 Jun 2012 17:00:34 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201206011700.q51H0YTU031386@svn.freebsd.org> From: Jung-uk Kim Date: Fri, 1 Jun 2012 17:00:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r236408 - head/sys/dev/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jun 2012 17:00:34 -0000 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",