From 81f5786d70eeea3985f3c9bb6d659f6b6cf716e4 Mon Sep 17 00:00:00 2001 From: Marco Peereboom Date: Tue, 21 Feb 2006 01:10:11 +0000 Subject: Print the parent name which is way more useful than the node name. E.a: _LID instead of _HID. --- sys/dev/acpi/acpibtn.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'sys/dev') 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 * @@ -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); } -- cgit v1.2.3