diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2008-05-16 06:50:56 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2008-05-16 06:50:56 +0000 |
commit | 1b882095f169e506c0d98c8ddbb86c6e2e8856af (patch) | |
tree | 4fd5ddca8f701a398926df6a1863a08e5606b9c9 /sys/dev/acpi/acpibat.c | |
parent | 3093a6ff905bedc86e26f69bd1e69be1d02e5d46 (diff) |
back out jordans new parser.
it didnt have enough oks from the right people, it did break machines
that were previously working, and it bloated the RAMDISKS and install
media beyond the constraints of the media.
requested by deraadt@
Diffstat (limited to 'sys/dev/acpi/acpibat.c')
-rw-r--r-- | sys/dev/acpi/acpibat.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/dev/acpi/acpibat.c b/sys/dev/acpi/acpibat.c index 9ba4516ab09..d5ca76e6428 100644 --- a/sys/dev/acpi/acpibat.c +++ b/sys/dev/acpi/acpibat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpibat.c,v 1.47 2008/05/14 05:24:36 jordan Exp $ */ +/* $OpenBSD: acpibat.c,v 1.48 2008/05/16 06:50:55 dlg 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; + sc->sc_devnode = aa->aaa_node->child; 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->name); + printf(": %s", sc->sc_devnode->parent->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->name); + printf(": %s not present\n", sc->sc_devnode->parent->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, aa->aaa_dev, + aml_register_notify(sc->sc_devnode->parent, 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->name); + sc->sc_devnode->parent->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->name); + sc->sc_devnode->parent->name); switch (notify_type) { case 0x80: /* _BST changed */ if (!sc->sc_bat_present) { printf("%s: %s: inserted\n", DEVNAME(sc), - sc->sc_devnode->name); + sc->sc_devnode->parent->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->name); + sc->sc_devnode->parent->name); sc->sc_bat_present = 0; } break; |