mirror of https://github.com/acpica/acpica/
Merge pull request #744 from rafaeljw/headers
Headers: Use uintptr_t and offsetof() in Linux kernel builds
This commit is contained in:
commit
84449c1eef
|
@ -658,8 +658,12 @@ typedef UINT64 ACPI_INTEGER;
|
|||
/* Pointer/Integer type conversions */
|
||||
|
||||
#define ACPI_TO_POINTER(i) ACPI_CAST_PTR (void, (ACPI_SIZE) (i))
|
||||
#ifndef ACPI_TO_INTEGER
|
||||
#define ACPI_TO_INTEGER(p) ACPI_PTR_DIFF (p, (void *) 0)
|
||||
#endif
|
||||
#ifndef ACPI_OFFSET
|
||||
#define ACPI_OFFSET(d, f) ACPI_PTR_DIFF (&(((d *) 0)->f), (void *) 0)
|
||||
#endif
|
||||
#define ACPI_PTR_TO_PHYSADDR(i) ACPI_TO_INTEGER(i)
|
||||
|
||||
/* Optimizations for 4-character (32-bit) ACPI_NAME manipulation */
|
||||
|
|
|
@ -252,6 +252,11 @@
|
|||
#define ACPI_SPINLOCK spinlock_t *
|
||||
#define ACPI_CPU_FLAGS unsigned long
|
||||
|
||||
#define ACPI_UINTPTR_T uintptr_t
|
||||
|
||||
#define ACPI_TO_INTEGER(p) ((uintptr_t)(p))
|
||||
#define ACPI_OFFSET(d, f) offsetof(d, f)
|
||||
|
||||
/* Use native linux version of AcpiOsAllocateZeroed */
|
||||
|
||||
#define USE_NATIVE_ALLOCATE_ZEROED
|
||||
|
|
Loading…
Reference in New Issue