summaryrefslogtreecommitdiff
path: root/sys/dev/acpi/acpibtn.c
diff options
context:
space:
mode:
authorJordan Hargrave <jordan@cvs.openbsd.org>2006-10-12 16:38:22 +0000
committerJordan Hargrave <jordan@cvs.openbsd.org>2006-10-12 16:38:22 +0000
commit6da6d7f85be2b5a66f1fabf7819fcf4571af7818 (patch)
treeb02a1468c2198cc0b02a60af99e7764246a7c66f /sys/dev/acpi/acpibtn.c
parentceb8e7fc2476b3fef728bffeacd7694ec28ce742 (diff)
Massive ACPI changes
Fixed ACPI leaks new ACPI API ok marco@
Diffstat (limited to 'sys/dev/acpi/acpibtn.c')
-rw-r--r--sys/dev/acpi/acpibtn.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/sys/dev/acpi/acpibtn.c b/sys/dev/acpi/acpibtn.c
index 46ef1f9670f..9b1573f4302 100644
--- a/sys/dev/acpi/acpibtn.c
+++ b/sys/dev/acpi/acpibtn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpibtn.c,v 1.10 2006/05/31 10:01:56 canacar Exp $ */
+/* $OpenBSD: acpibtn.c,v 1.11 2006/10/12 16:38:21 jordan Exp $ */
/*
* Copyright (c) 2005 Marco Peereboom <marco@openbsd.org>
*
@@ -102,14 +102,7 @@ acpibtn_attach(struct device *parent, struct device *self, void *aux)
int
acpibtn_getsta(struct acpibtn_softc *sc)
{
- struct aml_value res, env;
- struct acpi_context *ctx;
-
- memset(&res, 0, sizeof(res));
- memset(&env, 0, sizeof(env));
-
- ctx = NULL;
- if (aml_eval_name(sc->sc_acpi, sc->sc_devnode, "_STA", &res, &env)) {
+ if (aml_evalname(sc->sc_acpi, sc->sc_devnode, "_STA", 0, NULL, NULL) != 0) {
dnprintf(20, "%s: no _STA\n", DEVNAME(sc));
/* XXX not all buttons have _STA so FALLTROUGH */
}