Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/acpi Move setting of acpi_verbose_loaded flag into t...
details: https://anonhg.NetBSD.org/src/rev/89955a8ceafd
branches: trunk
changeset: 756584:89955a8ceafd
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Sun Jul 25 12:54:46 2010 +0000
description:
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.
diffstat:
sys/dev/acpi/acpi.c | 16 +++++++---------
sys/dev/acpi/acpi_verbose.c | 5 +++--
2 files changed, 10 insertions(+), 11 deletions(-)
diffs (63 lines):
diff -r 5f9748c3d146 -r 89955a8ceafd sys/dev/acpi/acpi.c
--- a/sys/dev/acpi/acpi.c Sun Jul 25 11:25:57 2010 +0000
+++ b/sys/dev/acpi/acpi.c Sun Jul 25 12:54:46 2010 +0000
@@ -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
diff -r 5f9748c3d146 -r 89955a8ceafd sys/dev/acpi/acpi_verbose.c
--- a/sys/dev/acpi/acpi_verbose.c Sun Jul 25 11:25:57 2010 +0000
+++ b/sys/dev/acpi/acpi_verbose.c Sun Jul 25 12:54:46 2010 +0000
@@ -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;
Home |
Main Index |
Thread Index |
Old Index