Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/acpi Do not entirely bypass the printfs during resou...
details: https://anonhg.NetBSD.org/src/rev/1ff3eb4d9082
branches: trunk
changeset: 766092:1ff3eb4d9082
user: jruoho <jruoho%NetBSD.org@localhost>
date: Wed Jun 15 09:02:38 2011 +0000
description:
Do not entirely bypass the printfs during resource parsing, as many drivers
rely on those for their autoconf(9) messages. Instead add a "quiet" option.
diffstat:
sys/dev/acpi/acpi_resource.c | 23 +++++++++++++++++++----
sys/dev/acpi/acpivar.h | 3 ++-
sys/dev/acpi/hpet_acpi.c | 6 +++---
3 files changed, 24 insertions(+), 8 deletions(-)
diffs (99 lines):
diff -r df91b0e46d34 -r 1ff3eb4d9082 sys/dev/acpi/acpi_resource.c
--- a/sys/dev/acpi/acpi_resource.c Wed Jun 15 08:48:35 2011 +0000
+++ b/sys/dev/acpi/acpi_resource.c Wed Jun 15 09:02:38 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_resource.c,v 1.33 2011/06/15 08:04:49 jruoho Exp $ */
+/* $NetBSD: acpi_resource.c,v 1.34 2011/06/15 09:02:38 jruoho Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_resource.c,v 1.33 2011/06/15 08:04:49 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_resource.c,v 1.34 2011/06/15 09:02:38 jruoho Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -618,6 +618,23 @@
.end_dep = acpi_res_parse_end_dep,
};
+const struct acpi_resource_parse_ops acpi_resource_parse_ops_quiet = {
+ .init = acpi_res_parse_init,
+ .fini = NULL,
+
+ .ioport = acpi_res_parse_ioport,
+ .iorange = acpi_res_parse_iorange,
+
+ .memory = acpi_res_parse_memory,
+ .memrange = acpi_res_parse_memrange,
+
+ .irq = acpi_res_parse_irq,
+ .drq = acpi_res_parse_drq,
+
+ .start_dep = acpi_res_parse_start_dep,
+ .end_dep = acpi_res_parse_end_dep,
+};
+
static void
acpi_res_parse_init(device_t dev, void *arg, void **contextp)
{
@@ -647,12 +664,10 @@
static void
acpi_res_parse_fini(device_t dev, void *context)
{
-#ifdef ACPI_DEBUG
struct acpi_resources *res = context;
/* Print the resources we're using. */
acpi_resource_print(dev, res);
-#endif
}
static void
diff -r df91b0e46d34 -r 1ff3eb4d9082 sys/dev/acpi/acpivar.h
--- a/sys/dev/acpi/acpivar.h Wed Jun 15 08:48:35 2011 +0000
+++ b/sys/dev/acpi/acpivar.h Wed Jun 15 09:02:38 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpivar.h,v 1.70 2011/06/14 13:59:23 jruoho Exp $ */
+/* $NetBSD: acpivar.h,v 1.71 2011/06/15 09:02:38 jruoho Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@@ -291,6 +291,7 @@
extern int acpi_active;
extern const struct acpi_resource_parse_ops acpi_resource_parse_ops_default;
+extern const struct acpi_resource_parse_ops acpi_resource_parse_ops_quiet;
int acpi_probe(void);
void acpi_disable(void);
diff -r df91b0e46d34 -r 1ff3eb4d9082 sys/dev/acpi/hpet_acpi.c
--- a/sys/dev/acpi/hpet_acpi.c Wed Jun 15 08:48:35 2011 +0000
+++ b/sys/dev/acpi/hpet_acpi.c Wed Jun 15 09:02:38 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hpet_acpi.c,v 1.10 2011/06/15 08:19:43 jruoho Exp $ */
+/* $NetBSD: hpet_acpi.c,v 1.11 2011/06/15 09:02:38 jruoho Exp $ */
/*
* Copyright (c) 2011 Jukka Ruohonen
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hpet_acpi.c,v 1.10 2011/06/15 08:19:43 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hpet_acpi.c,v 1.11 2011/06/15 09:02:38 jruoho Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -210,7 +210,7 @@
ACPI_STATUS rv;
rv = acpi_resource_parse(self, aa->aa_node->ad_handle, "_CRS",
- &res, &acpi_resource_parse_ops_default);
+ &res, &acpi_resource_parse_ops_quiet);
if (ACPI_FAILURE(rv))
return 0;
Home |
Main Index |
Thread Index |
Old Index