diff options
author | Marco Peereboom <marco@cvs.openbsd.org> | 2008-06-01 17:59:56 +0000 |
---|---|---|
committer | Marco Peereboom <marco@cvs.openbsd.org> | 2008-06-01 17:59:56 +0000 |
commit | cbc33fb1757f353b753efe6c3cccbfaafd77470f (patch) | |
tree | aeb2d3bad30ad0996583a2bc82639b90c65fa644 /sys/dev/acpi/acpibat.c | |
parent | 5ffc77f9703592edda7da769bf3bf4d8797c5351 (diff) |
Re-enable new parser. Lots of testing by various folks. Fits all media
now too.
ok kettenis 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 d5ca76e6428..d1a837bb22d 100644 --- a/sys/dev/acpi/acpibat.c +++ b/sys/dev/acpi/acpibat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpibat.c,v 1.48 2008/05/16 06:50:55 dlg Exp $ */ +/* $OpenBSD: acpibat.c,v 1.49 2008/06/01 17:59:55 marco 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; |