Module Name: src
Committed By: jruoho
Date: Thu Mar 4 23:25:07 UTC 2010
Modified Files:
src/sys/dev/acpi: acpi.c
Log Message:
Remove ACPI_BUG_DEBUG by using ACPI_DEBUG_PRINT(x) instead.
To generate a diff of this commit:
cvs rdiff -u -r1.153 -r1.154 src/sys/dev/acpi/acpi.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.153 src/sys/dev/acpi/acpi.c:1.154
--- src/sys/dev/acpi/acpi.c:1.153 Thu Mar 4 20:17:30 2010
+++ src/sys/dev/acpi/acpi.c Thu Mar 4 23:25:07 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi.c,v 1.153 2010/03/04 20:17:30 jruoho Exp $ */
+/* $NetBSD: acpi.c,v 1.154 2010/03/04 23:25:07 jruoho Exp $ */
/*-
* Copyright (c) 2003, 2007 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.153 2010/03/04 20:17:30 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.154 2010/03/04 23:25:07 jruoho Exp $");
#include "opt_acpi.h"
#include "opt_pcifixup.h"
@@ -1112,19 +1112,12 @@
static UINT32
acpi_fixed_button_handler(void *context)
{
+ static const int handler = OSL_NOTIFY_HANDLER;
struct sysmon_pswitch *smpsw = context;
- ACPI_STATUS rv;
-#ifdef ACPI_BUT_DEBUG
- printf("%s: fixed button handler\n", smpsw->smpsw_name);
-#endif
+ ACPI_DEBUG_PRINT((ACPI_DB_INFO, "%s\n", __func__));
- rv = AcpiOsExecute(OSL_NOTIFY_HANDLER,
- acpi_fixed_button_pressed, smpsw);
- if (ACPI_FAILURE(rv))
- printf("%s: WARNING: unable to queue fixed button pressed "
- "callback: %s\n", smpsw->smpsw_name,
- AcpiFormatException(rv));
+ (void)AcpiOsExecute(handler, acpi_fixed_button_pressed, smpsw);
return ACPI_INTERRUPT_HANDLED;
}
@@ -1139,10 +1132,8 @@
{
struct sysmon_pswitch *smpsw = context;
-#ifdef ACPI_BUT_DEBUG
- printf("%s: fixed button pressed, calling sysmon\n",
- smpsw->smpsw_name);
-#endif
+ ACPI_DEBUG_PRINT((ACPI_DB_INFO, "%s: %s fixed button pressed\n",
+ __func__, smpsw->smpsw_name));
sysmon_pswitch_event(smpsw, PSWITCH_EVENT_PRESSED);
}