summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjcs <jcs@openbsd.org>2020-06-02 19:26:36 +0000
committerjcs <jcs@openbsd.org>2020-06-02 19:26:36 +0000
commita2a1e6008f86f71601bca5705a08c083af49bcfc (patch)
treeff67a86dc65762e38ce91f2a6e696f0680d7ebfb
parentMissing ; in previous. (diff)
downloadwireguard-openbsd-a2a1e6008f86f71601bca5705a08c083af49bcfc.tar.xz
wireguard-openbsd-a2a1e6008f86f71601bca5705a08c083af49bcfc.zip
disable debugging by default and only print unknown events when
debug is enabled
-rw-r--r--sys/dev/acpi/acpihid.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/dev/acpi/acpihid.c b/sys/dev/acpi/acpihid.c
index 4d0385670a8..5e622b06ac3 100644
--- a/sys/dev/acpi/acpihid.c
+++ b/sys/dev/acpi/acpihid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpihid.c,v 1.1 2020/06/02 16:24:24 jcs Exp $ */
+/* $OpenBSD: acpihid.c,v 1.2 2020/06/02 19:26:36 jcs Exp $ */
/*
* ACPI HID event and 5-button array driver
*
@@ -36,7 +36,6 @@
#include "wskbd.h"
/* #define ACPIHID_DEBUG */
-#define ACPIHID_DEBUG
#ifdef ACPIHID_DEBUG
#define DPRINTF(x) printf x
@@ -358,9 +357,9 @@ acpihid_button_array_enable(struct acpihid_softc *sc, int enable)
int
acpihid_notify(struct aml_node *node, int notify_type, void *arg)
{
+#ifdef ACPIHID_DEBUG
struct acpihid_softc *sc = arg;
-#ifdef ACPIHID_DEBUG
DPRINTF(("%s: %s: %.2x\n", sc->sc_dev.dv_xname, __func__,
notify_type));
#endif
@@ -393,8 +392,8 @@ acpihid_notify(struct aml_node *node, int notify_type, void *arg)
case 0xcf: /* power button release */
break;
default:
- printf("%s: unhandled button 0x%x\n", sc->sc_dev.dv_xname,
- notify_type);
+ DPRINTF(("%s: unhandled button 0x%x\n", sc->sc_dev.dv_xname,
+ notify_type));
}
return 0;