Module Name:    src
Committed By:   jruoho
Date:           Tue Mar  1 13:38:45 UTC 2011

Modified Files:
        src/sys/dev/acpi: acpi_cpu.c

Log Message:
Detach evcnt(9) before the states.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/dev/acpi/acpi_cpu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/acpi/acpi_cpu.c
diff -u src/sys/dev/acpi/acpi_cpu.c:1.33 src/sys/dev/acpi/acpi_cpu.c:1.34
--- src/sys/dev/acpi/acpi_cpu.c:1.33	Tue Mar  1 05:57:04 2011
+++ src/sys/dev/acpi/acpi_cpu.c	Tue Mar  1 13:38:45 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_cpu.c,v 1.33 2011/03/01 05:57:04 jruoho Exp $ */
+/* $NetBSD: acpi_cpu.c,v 1.34 2011/03/01 13:38:45 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2010, 2011 Jukka Ruohonen <[email protected]>
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_cpu.c,v 1.33 2011/03/01 05:57:04 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_cpu.c,v 1.34 2011/03/01 13:38:45 jruoho Exp $");
 
 #include <sys/param.h>
 #include <sys/cpu.h>
@@ -183,6 +183,8 @@
 	int rv = 0;
 
 	sc->sc_cold = true;
+
+	acpicpu_evcnt_detach(self);
 	acpi_deregister_notify(sc->sc_node);
 
 	if ((sc->sc_flags & ACPICPU_FLAG_C) != 0)
@@ -204,7 +206,6 @@
 		return rv;
 
 	mutex_destroy(&sc->sc_mtx);
-	acpicpu_evcnt_detach(self);
 
 	sc->sc_node->ad_device = NULL;
 

Reply via email to