Module Name: src Committed By: pgoyette Date: Sun Jul 25 12:54:46 UTC 2010
Modified Files: src/sys/dev/acpi: acpi.c acpi_verbose.c Log Message: Move setting of acpi_verbose_loaded flag into the module's init routine. This ensures that the flag is set even if the module was manually loaded by the user rather than just auto-loaded. To generate a diff of this commit: cvs rdiff -u -r1.207 -r1.208 src/sys/dev/acpi/acpi.c cvs rdiff -u -r1.3 -r1.4 src/sys/dev/acpi/acpi_verbose.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.c diff -u src/sys/dev/acpi/acpi.c:1.207 src/sys/dev/acpi/acpi.c:1.208 --- src/sys/dev/acpi/acpi.c:1.207 Sun Jul 18 09:29:12 2010 +++ src/sys/dev/acpi/acpi.c Sun Jul 25 12:54:46 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi.c,v 1.207 2010/07/18 09:29:12 jruoho Exp $ */ +/* $NetBSD: acpi.c,v 1.208 2010/07/25 12:54:46 pgoyette Exp $ */ /*- * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.207 2010/07/18 09:29:12 jruoho Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.208 2010/07/25 12:54:46 pgoyette Exp $"); #include "opt_acpi.h" #include "opt_pcifixup.h" @@ -226,13 +226,11 @@ void acpi_load_verbose(void) { - if (acpi_verbose_loaded) - return; - - mutex_enter(&module_lock); - if (module_autoload("acpiverbose", MODULE_CLASS_MISC) == 0) - acpi_verbose_loaded++; - mutex_exit(&module_lock); + if (acpi_verbose_loaded == 0) { + mutex_enter(&module_lock); + module_autoload("acpiverbose", MODULE_CLASS_MISC); + mutex_exit(&module_lock); + } } void Index: src/sys/dev/acpi/acpi_verbose.c diff -u src/sys/dev/acpi/acpi_verbose.c:1.3 src/sys/dev/acpi/acpi_verbose.c:1.4 --- src/sys/dev/acpi/acpi_verbose.c:1.3 Mon Jun 7 01:45:27 2010 +++ src/sys/dev/acpi/acpi_verbose.c Sun Jul 25 12:54:46 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_verbose.c,v 1.3 2010/06/07 01:45:27 pgoyette Exp $ */ +/* $NetBSD: acpi_verbose.c,v 1.4 2010/07/25 12:54:46 pgoyette Exp $ */ /*- * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: acpi_verbose.c,v 1.3 2010/06/07 01:45:27 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_verbose.c,v 1.4 2010/07/25 12:54:46 pgoyette Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -103,6 +103,7 @@ acpi_print_tree = acpi_print_tree_real; acpi_print_dev = acpi_print_dev_real; acpi_wmidump = acpi_wmidump_real; + acpi_verbose_loaded = 1; return 0; case MODULE_CMD_FINI: acpi_print_devnodes = saved_print_devnodes;