diff options
| author | 2009-03-11 20:37:46 +0000 | |
|---|---|---|
| committer | 2009-03-11 20:37:46 +0000 | |
| commit | a95d1b726502d8729b1ae367df6fb0b2669ee8f0 (patch) | |
| tree | ea9415a68b549126a0d17c14e3a67de5917cc934 /sys/dev/acpi/acpiprt.c | |
| parent | Rework command polling to be able to sleep if no SCSI_NOSLEEP flag (diff) | |
| download | wireguard-openbsd-a95d1b726502d8729b1ae367df6fb0b2669ee8f0.tar.xz wireguard-openbsd-a95d1b726502d8729b1ae367df6fb0b2669ee8f0.zip | |
Cleanup.. use aml_evalinteger instead of aml_evalname
ok marco@
Diffstat (limited to 'sys/dev/acpi/acpiprt.c')
| -rw-r--r-- | sys/dev/acpi/acpiprt.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/dev/acpi/acpiprt.c b/sys/dev/acpi/acpiprt.c index 7359d0b3bfc..bd3e4f25cc0 100644 --- a/sys/dev/acpi/acpiprt.c +++ b/sys/dev/acpi/acpiprt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpiprt.c,v 1.31 2009/01/27 21:32:00 kettenis Exp $ */ +/* $OpenBSD: acpiprt.c,v 1.32 2009/03/11 20:37:46 jordan Exp $ */ /* * Copyright (c) 2006 Mark Kettenis <kettenis@openbsd.org> * @@ -216,7 +216,8 @@ acpiprt_prt_add(struct acpiprt_softc *sc, struct aml_value *v) struct aml_node *node; struct aml_value res, *pp; u_int64_t addr; - int pin, irq, sta; + int pin, irq; + int64_t sta; #if NIOAPIC > 0 struct mp_intr_map *map; struct ioapic_softc *apic; @@ -260,13 +261,11 @@ acpiprt_prt_add(struct acpiprt_softc *sc, struct aml_value *v) } if (pp->type == AML_OBJTYPE_DEVICE) { node = pp->node; - if (aml_evalname(sc->sc_acpi, node, "_STA", 0, NULL, &res)) { + if (aml_evalinteger(sc->sc_acpi, node, "_STA", 0, NULL, &sta)) { printf("no _STA method\n"); return; } - sta = aml_val2int(&res); - aml_freevalue(&res); if ((sta & STA_PRESENT) == 0) return; |
