diff options
author | jkim <jkim@FreeBSD.org> | 2011-04-04 18:39:04 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2011-04-04 18:39:04 +0000 |
commit | 52d591d29b63c48c216826e70fd8ffe3a5281df4 (patch) | |
tree | 5aee8604e07039a127298132d9932a103eec91d3 /sys/dev/acpica | |
parent | fd38f1e08c79f1ed404956cc8814525593d9c72b (diff) | |
download | FreeBSD-src-52d591d29b63c48c216826e70fd8ffe3a5281df4.zip FreeBSD-src-52d591d29b63c48c216826e70fd8ffe3a5281df4.tar.gz |
Move a trivial acpi_TimerDelta() to acpivar.h to make it inlineable.
Diffstat (limited to 'sys/dev/acpica')
-rw-r--r-- | sys/dev/acpica/acpi.c | 10 | ||||
-rw-r--r-- | sys/dev/acpica/acpivar.h | 11 |
2 files changed, 10 insertions, 11 deletions
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index d1c9e8e..f0a8cac 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -2084,16 +2084,6 @@ acpi_GetHandleInScope(ACPI_HANDLE parent, char *path, ACPI_HANDLE *result) } } -/* Find the difference between two PM tick counts. */ -uint32_t -acpi_TimerDelta(uint32_t end, uint32_t start) -{ - - if (end < start && (AcpiGbl_FADT.Flags & ACPI_FADT_32BIT_TIMER) == 0) - end |= 0x01000000; - return (end - start); -} - /* * Allocate a buffer with a preset data size. */ diff --git a/sys/dev/acpica/acpivar.h b/sys/dev/acpica/acpivar.h index 167baa6..a74cd75 100644 --- a/sys/dev/acpica/acpivar.h +++ b/sys/dev/acpica/acpivar.h @@ -273,6 +273,16 @@ acpi_get_type(device_t dev) return (t); } +/* Find the difference between two PM tick counts. */ +static __inline uint32_t +acpi_TimerDelta(uint32_t end, uint32_t start) +{ + + if (end < start && (AcpiGbl_FADT.Flags & ACPI_FADT_32BIT_TIMER) == 0) + end |= 0x01000000; + return (end - start); +} + #ifdef ACPI_DEBUGGER void acpi_EnterDebugger(void); #endif @@ -311,7 +321,6 @@ BOOLEAN acpi_DeviceIsPresent(device_t dev); BOOLEAN acpi_BatteryIsPresent(device_t dev); ACPI_STATUS acpi_GetHandleInScope(ACPI_HANDLE parent, char *path, ACPI_HANDLE *result); -uint32_t acpi_TimerDelta(uint32_t end, uint32_t start); ACPI_BUFFER *acpi_AllocBuffer(int size); ACPI_STATUS acpi_ConvertBufferToInteger(ACPI_BUFFER *bufp, UINT32 *number); |