summaryrefslogtreecommitdiffstats
path: root/source/include/acmacros.h
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2013-01-28 20:33:31 +0000
committerjkim <jkim@FreeBSD.org>2013-01-28 20:33:31 +0000
commit713ce6817a3fbfd4bf492408e97d9b7468853c17 (patch)
treec5fd61f1cf7a6e7cd4445ecdc3dbaf078f878817 /source/include/acmacros.h
parent027eccae328e85959a157a9ad15380c2f72f0a30 (diff)
downloadFreeBSD-src-713ce6817a3fbfd4bf492408e97d9b7468853c17.zip
FreeBSD-src-713ce6817a3fbfd4bf492408e97d9b7468853c17.tar.gz
Fix a long standing bug. NextObject is the first field for very long time.
Diffstat (limited to 'source/include/acmacros.h')
-rw-r--r--source/include/acmacros.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/include/acmacros.h b/source/include/acmacros.h
index b5d3c92..a56dcd7 100644
--- a/source/include/acmacros.h
+++ b/source/include/acmacros.h
@@ -325,10 +325,12 @@
* where a pointer to an object of type ACPI_OPERAND_OBJECT can also
* appear. This macro is used to distinguish them.
*
- * The "Descriptor" field is the first field in both structures.
+ * The "DescriptorType" field is the second field in both structures.
*/
+#define ACPI_GET_DESCRIPTOR_PTR(d) (((ACPI_DESCRIPTOR *)(void *)(d))->Common.CommonPointer)
+#define ACPI_SET_DESCRIPTOR_PTR(d, p) (((ACPI_DESCRIPTOR *)(void *)(d))->Common.CommonPointer = (p))
#define ACPI_GET_DESCRIPTOR_TYPE(d) (((ACPI_DESCRIPTOR *)(void *)(d))->Common.DescriptorType)
-#define ACPI_SET_DESCRIPTOR_TYPE(d, t) (((ACPI_DESCRIPTOR *)(void *)(d))->Common.DescriptorType = t)
+#define ACPI_SET_DESCRIPTOR_TYPE(d, t) (((ACPI_DESCRIPTOR *)(void *)(d))->Common.DescriptorType = (t))
/*
* Macros for the master AML opcode table
OpenPOWER on IntegriCloud