summaryrefslogtreecommitdiff
path: root/sys/dev/acpi/acpibat.c
diff options
context:
space:
mode:
authorJordan Hargrave <jordan@cvs.openbsd.org>2008-05-14 05:24:37 +0000
committerJordan Hargrave <jordan@cvs.openbsd.org>2008-05-14 05:24:37 +0000
commit061ad1998a863108b170a10410e852ef37275c3f (patch)
tree373ed0c825558c04877e8e044db3ae72a747d432 /sys/dev/acpi/acpibat.c
parent2aa4a915950bec32c6d8ff1cafcb4826c36baf51 (diff)
Adding new ACPI Parser code
Old guts of code still exists, needs to be torn out next ok marco@ ok brad@
Diffstat (limited to 'sys/dev/acpi/acpibat.c')
-rw-r--r--sys/dev/acpi/acpibat.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/dev/acpi/acpibat.c b/sys/dev/acpi/acpibat.c
index 90d01e3608d..9ba4516ab09 100644
--- a/sys/dev/acpi/acpibat.c
+++ b/sys/dev/acpi/acpibat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpibat.c,v 1.46 2007/11/16 13:58:18 deraadt Exp $ */
+/* $OpenBSD: acpibat.c,v 1.47 2008/05/14 05:24:36 jordan Exp $ */
/*
* Copyright (c) 2005 Marco Peereboom <marco@openbsd.org>
*
@@ -70,7 +70,7 @@ acpibat_attach(struct device *parent, struct device *self, void *aux)
struct aml_value res;
sc->sc_acpi = (struct acpi_softc *)parent;
- sc->sc_devnode = aa->aaa_node->child;
+ sc->sc_devnode = aa->aaa_node;
if (aml_evalname(sc->sc_acpi, sc->sc_devnode, "_STA", 0, NULL, &res)) {
dnprintf(10, "%s: no _STA\n", DEVNAME(sc));
@@ -81,7 +81,7 @@ acpibat_attach(struct device *parent, struct device *self, void *aux)
acpibat_getbif(sc);
acpibat_getbst(sc);
- printf(": %s", sc->sc_devnode->parent->name);
+ printf(": %s", sc->sc_devnode->name);
if (sc->sc_bif.bif_model[0])
printf(" model \"%s\"", sc->sc_bif.bif_model);
if (sc->sc_bif.bif_serial[0])
@@ -92,7 +92,7 @@ acpibat_attach(struct device *parent, struct device *self, void *aux)
printf(" oem \"%s\"", sc->sc_bif.bif_oem);
printf("\n");
} else
- printf(": %s not present\n", sc->sc_devnode->parent->name);
+ printf(": %s not present\n", sc->sc_devnode->name);
aml_freevalue(&res);
@@ -102,7 +102,7 @@ acpibat_attach(struct device *parent, struct device *self, void *aux)
/* populate sensors */
acpibat_refresh(sc);
- aml_register_notify(sc->sc_devnode->parent, aa->aaa_dev,
+ aml_register_notify(sc->sc_devnode, aa->aaa_dev,
acpibat_notify, sc, ACPIDEV_POLL);
}
@@ -173,7 +173,7 @@ acpibat_refresh(void *arg)
int i;
dnprintf(30, "%s: %s: refresh\n", DEVNAME(sc),
- sc->sc_devnode->parent->name);
+ sc->sc_devnode->name);
if (!sc->sc_bat_present) {
for (i = 0; i < 8; i++) {
@@ -398,13 +398,13 @@ acpibat_notify(struct aml_node *node, int notify_type, void *arg)
struct acpibat_softc *sc = arg;
dnprintf(10, "acpibat_notify: %.2x %s\n", notify_type,
- sc->sc_devnode->parent->name);
+ sc->sc_devnode->name);
switch (notify_type) {
case 0x80: /* _BST changed */
if (!sc->sc_bat_present) {
printf("%s: %s: inserted\n", DEVNAME(sc),
- sc->sc_devnode->parent->name);
+ sc->sc_devnode->name);
sc->sc_bat_present = 1;
}
break;
@@ -412,7 +412,7 @@ acpibat_notify(struct aml_node *node, int notify_type, void *arg)
/* XXX consider this a device removal */
if (sc->sc_bat_present) {
printf("%s: %s: removed\n", DEVNAME(sc),
- sc->sc_devnode->parent->name);
+ sc->sc_devnode->name);
sc->sc_bat_present = 0;
}
break;