summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2005-12-30 05:59:41 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2005-12-30 05:59:41 +0000
commit2ef6b179a49244ff48f356625bf6d7344cbc0280 (patch)
tree42774edc355244d8c6bd55503712dedf56fc440a /sys
parent55f2530f7eb3ea7946a0c2a4fa042b71caace98a (diff)
make ACPI_DEBUG compile
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/acpi/acpibat.c10
-rw-r--r--sys/dev/acpi/acpivar.h3
-rw-r--r--sys/dev/acpi/dsdt.c4
3 files changed, 8 insertions, 9 deletions
diff --git a/sys/dev/acpi/acpibat.c b/sys/dev/acpi/acpibat.c
index a1423b33d30..e9459aa524a 100644
--- a/sys/dev/acpi/acpibat.c
+++ b/sys/dev/acpi/acpibat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpibat.c,v 1.6 2005/12/28 03:25:15 marco Exp $ */
+/* $OpenBSD: acpibat.c,v 1.7 2005/12/30 05:59:40 tedu Exp $ */
/*
* Copyright (c) 2005 Marco Peereboom <marco@openbsd.org>
*
@@ -94,7 +94,7 @@ acpibat_getbif(struct acpibat_softc *sc)
memset(&env, 0, sizeof(env));
if (aml_eval_name(sc->sc_acpi, sc->sc_devnode, "_BIF", &res, &env)) {
- dprintf(50, "%s: no _BIF\n",
+ dnprintf(50, "%s: no _BIF\n",
DEVNAME(sc));
return (1);
}
@@ -119,7 +119,7 @@ acpibat_getbif(struct acpibat_softc *sc)
sc->sc_bif.bif_type = aml_strval(&res.v_package[11]);
sc->sc_bif.bif_oem = aml_strval(&res.v_package[12]);
- dprintf(20, "power_unit: %u capacity: %u last_cap: %u tech: %u "
+ dnprintf(20, "power_unit: %u capacity: %u last_cap: %u tech: %u "
"volt: %u warn: %u low: %u gran1: %u gran2: %d model: %s "
"serial: %s type: %s oem: %s\n",
sc->sc_bif.bif_power_unit,
@@ -148,7 +148,7 @@ acpibat_getbst(struct acpibat_softc *sc)
memset(&env, 0, sizeof(env));
if (aml_eval_name(sc->sc_acpi, sc->sc_devnode, "_BST", &res, &env)) {
- dprintf(50, "%s: no _BST\n",
+ dnprintf(50, "%s: no _BST\n",
DEVNAME(sc));
return (1);
}
@@ -164,7 +164,7 @@ acpibat_getbst(struct acpibat_softc *sc)
sc->sc_bst.bst_capacity = aml_intval(&res.v_package[2]);
sc->sc_bst.bst_voltage = aml_intval(&res.v_package[3]);
- dprintf(20, "state: %u rate: %u cap: %u volt: %u ",
+ dnprintf(20, "state: %u rate: %u cap: %u volt: %u ",
sc->sc_bst.bst_state,
sc->sc_bst.bst_rate,
sc->sc_bst.bst_capacity,
diff --git a/sys/dev/acpi/acpivar.h b/sys/dev/acpi/acpivar.h
index e5fbe3c7c87..77cc08a83ed 100644
--- a/sys/dev/acpi/acpivar.h
+++ b/sys/dev/acpi/acpivar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpivar.h,v 1.8 2005/12/28 03:06:30 jordan Exp $ */
+/* $OpenBSD: acpivar.h,v 1.9 2005/12/30 05:59:40 tedu Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
*
@@ -21,6 +21,7 @@
#include <sys/timeout.h>
#ifdef ACPI_DEBUG
+extern int acpi_debug;
#define dprintf(x...) do { if (acpi_debug) printf(x); } while(0)
#define dnprintf(n,x...) do { if (acpi_debug > (n)) printf(x); } while(0)
#else
diff --git a/sys/dev/acpi/dsdt.c b/sys/dev/acpi/dsdt.c
index 446a904eacd..6cccece8cf7 100644
--- a/sys/dev/acpi/dsdt.c
+++ b/sys/dev/acpi/dsdt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dsdt.c,v 1.12 2005/12/28 03:04:56 jordan Exp $ */
+/* $OpenBSD: dsdt.c,v 1.13 2005/12/30 05:59:40 tedu Exp $ */
/*
* Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org>
*
@@ -27,8 +27,6 @@
#include <dev/acpi/amltypes.h>
#include <dev/acpi/dsdt.h>
-extern int acpi_debug;
-
struct aml_optable
{
u_int16_t opcode;