Adjust locking for previous.
This commit is contained in:
parent
99f8ada841
commit
6846d4aa28
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: acpi_cpu_pstate.c,v 1.28 2010/08/17 10:35:22 jruoho Exp $ */
|
||||
/* $NetBSD: acpi_cpu_pstate.c,v 1.29 2010/08/17 10:57:30 jruoho Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2010 Jukka Ruohonen <jruohonen@iki.fi>
|
||||
|
@ -27,7 +27,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*/
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_pstate.c,v 1.28 2010/08/17 10:35:22 jruoho Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_pstate.c,v 1.29 2010/08/17 10:57:30 jruoho Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/evcnt.h>
|
||||
|
@ -57,7 +57,7 @@ static void acpicpu_pstate_change(struct acpicpu_softc *);
|
|||
static void acpicpu_pstate_reset(struct acpicpu_softc *);
|
||||
static void acpicpu_pstate_bios(void);
|
||||
|
||||
static uint32_t acpicpu_pstate_saved;
|
||||
static uint32_t acpicpu_pstate_saved = 0;
|
||||
|
||||
void
|
||||
acpicpu_pstate_attach(device_t self)
|
||||
|
@ -273,7 +273,9 @@ acpicpu_pstate_suspend(device_t self)
|
|||
struct acpicpu_pstate *ps = NULL;
|
||||
int32_t i;
|
||||
|
||||
mutex_enter(&sc->sc_mtx);
|
||||
acpicpu_pstate_reset(sc);
|
||||
mutex_exit(&sc->sc_mtx);
|
||||
|
||||
if (acpicpu_pstate_saved != 0)
|
||||
return true;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: acpi_cpu_tstate.c,v 1.13 2010/08/17 10:35:22 jruoho Exp $ */
|
||||
/* $NetBSD: acpi_cpu_tstate.c,v 1.14 2010/08/17 10:57:30 jruoho Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2010 Jukka Ruohonen <jruohonen@iki.fi>
|
||||
|
@ -27,7 +27,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*/
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_tstate.c,v 1.13 2010/08/17 10:35:22 jruoho Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_tstate.c,v 1.14 2010/08/17 10:57:30 jruoho Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/evcnt.h>
|
||||
|
@ -209,7 +209,9 @@ acpicpu_tstate_suspend(device_t self)
|
|||
{
|
||||
struct acpicpu_softc *sc = device_private(self);
|
||||
|
||||
mutex_enter(&sc->sc_mtx);
|
||||
acpicpu_tstate_reset(sc);
|
||||
mutex_exit(&sc->sc_mtx);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue