summaryrefslogtreecommitdiff
path: root/sys/dev/acpi
diff options
context:
space:
mode:
authorMarco Peereboom <marco@cvs.openbsd.org>2006-02-21 01:10:11 +0000
committerMarco Peereboom <marco@cvs.openbsd.org>2006-02-21 01:10:11 +0000
commit81f5786d70eeea3985f3c9bb6d659f6b6cf716e4 (patch)
tree66abd720acf544411fab9a88658b69e0868e665c /sys/dev/acpi
parentfe27e2c89125cc680bbb6b71649accbc4fa6931e (diff)
Print the parent name which is way more useful than the node name.
E.a: _LID instead of _HID.
Diffstat (limited to 'sys/dev/acpi')
-rw-r--r--sys/dev/acpi/acpibtn.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/sys/dev/acpi/acpibtn.c b/sys/dev/acpi/acpibtn.c
index fb22bac3ce1..711f931e94b 100644
--- a/sys/dev/acpi/acpibtn.c
+++ b/sys/dev/acpi/acpibtn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpibtn.c,v 1.2 2006/02/20 04:59:43 jordan Exp $ */
+/* $OpenBSD: acpibtn.c,v 1.3 2006/02/21 01:10:10 marco Exp $ */
/*
* Copyright (c) 2005 Marco Peereboom <marco@openbsd.org>
*
@@ -134,12 +134,9 @@ acpibtn_getsta(struct acpibtn_softc *sc)
memset(&env, 0, sizeof(env));
ctx = NULL;
- if (aml_eval_name(sc->sc_acpi, sc->sc_devnode, "_STA", &res, &env)) {
- dnprintf(10, "%s: no _STA\n",
- DEVNAME(sc));
- /* XXX this should fall through */
- return (1);
- }
+ if (aml_eval_name(sc->sc_acpi, sc->sc_devnode, "_STA", &res, &env))
+ dnprintf(10, "%s: no _STA\n", DEVNAME(sc));
+ /* not all buttons have _STA so FALLTROUGH */
return (0);
}
@@ -149,6 +146,8 @@ acpibtn_notify(struct aml_node *node, int notify_type, void *arg)
{
struct acpibtn_softc *sc = arg;
- printf("acpibtn_notify: %.2x %s\n", notify_type, sc->sc_devnode->name);
+ printf("acpibtn_notify: %.2x %s\n", notify_type,
+ sc->sc_devnode->parent->name);
+
return (0);
}