diff options
author | Jordan Hargrave <jordan@cvs.openbsd.org> | 2006-02-20 22:03:59 +0000 |
---|---|---|
committer | Jordan Hargrave <jordan@cvs.openbsd.org> | 2006-02-20 22:03:59 +0000 |
commit | fe27e2c89125cc680bbb6b71649accbc4fa6931e (patch) | |
tree | aef58763ac8f6fbc07b07e66b2125bff5977eab1 /sys/dev/acpi/dsdt.c | |
parent | bf0b237c15880d87dfbad89fde305dde7c23175c (diff) |
Calling parseint instead of parseval for getpciaddr
ok marco@
Diffstat (limited to 'sys/dev/acpi/dsdt.c')
-rw-r--r-- | sys/dev/acpi/dsdt.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/sys/dev/acpi/dsdt.c b/sys/dev/acpi/dsdt.c index ea32c370399..d9773d07521 100644 --- a/sys/dev/acpi/dsdt.c +++ b/sys/dev/acpi/dsdt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dsdt.c,v 1.27 2006/02/20 21:58:49 jordan Exp $ */ +/* $OpenBSD: dsdt.c,v 1.28 2006/02/20 22:03:58 jordan Exp $ */ /* * Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org> * @@ -1392,7 +1392,6 @@ aml_get_pciaddr(struct acpi_context *ctx, struct aml_node *node, uint64_t ioaddr) { struct aml_node *val; - struct aml_value *rv; uint8_t reg, bus, dev, fn; /* ioaddr on input = <reg> */ @@ -1400,17 +1399,13 @@ aml_get_pciaddr(struct acpi_context *ctx, struct aml_node *node, reg = ioaddr; if ((val = aml_searchname(node, "_ADR")) != NULL) { /* _ADR holds <dev>:<fn> */ - rv = aml_eparsenode(ctx, val); - ioaddr = aml_val2int(ctx, rv); - aml_freevalue(&rv); + ioaddr = aml_eparseint(ctx, AML_ANYINT); fn = ioaddr & 0xFFFF; dev = ioaddr >> 16; } if ((val = aml_searchname(node, "_BBN")) != NULL) { /* _BBN holds <bus> */ - rv = aml_eparsenode(ctx, val); - ioaddr = aml_val2int(ctx, rv); - aml_freevalue(&rv); + ioaddr = aml_eparseint(ctx, AML_ANYINT); bus = ioaddr; } return ACPI_PCI_ADDR(bus, dev, fn, reg); |