Module Name: src Committed By: jakllsch Date: Fri Aug 5 18:59:45 UTC 2011
Modified Files: src/sys/dev/acpi: acpi.c Log Message: Turns out all we need is AcpiClearEvent in the right place, and we don't really care if it fails. Pointed out by jmcneill. To generate a diff of this commit: cvs rdiff -u -r1.249 -r1.250 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.249 src/sys/dev/acpi/acpi.c:1.250 --- src/sys/dev/acpi/acpi.c:1.249 Fri Aug 5 18:27:48 2011 +++ src/sys/dev/acpi/acpi.c Fri Aug 5 18:59:44 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi.c,v 1.249 2011/08/05 18:27:48 jakllsch Exp $ */ +/* $NetBSD: acpi.c,v 1.250 2011/08/05 18:59:44 jakllsch Exp $ */ /*- * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc. @@ -100,7 +100,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.249 2011/08/05 18:27:48 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.250 2011/08/05 18:59:44 jakllsch Exp $"); #include "opt_acpi.h" #include "opt_pcifixup.h" @@ -1174,6 +1174,8 @@ goto fail; } + AcpiClearEvent(event); + rv = AcpiInstallFixedEventHandler(event, acpi_fixed_button_handler, smpsw); @@ -1185,20 +1187,6 @@ aprint_debug_dev(sc->sc_dev, "fixed %s button present\n", (type != ACPI_EVENT_SLEEP_BUTTON) ? "power" : "sleep"); - rv = AcpiClearEvent(event) - if (ACPI_FAILURE(rv)) { - aprint_error_dev(sc->sc_dev, - "fixed event %d did not clear: %s\n", - event, AcpiFormatException(rv)); - } - - rv = AcpiEnableEvent(event, 0)) - if (ACPI_FAILURE(rv)) { - aprint_error_dev(sc->sc_dev, - "fixed event %d did not enable: %s\n", - event, AcpiFormatException(rv)); - } - return; fail: