Date: Mon, 4 Apr 2011 18:39:04 +0000 (UTC) From: Jung-uk Kim <jkim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r220338 - head/sys/dev/acpica Message-ID: <201104041839.p34Id4Ka092166@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jkim Date: Mon Apr 4 18:39:04 2011 New Revision: 220338 URL: http://svn.freebsd.org/changeset/base/220338 Log: Move a trivial acpi_TimerDelta() to acpivar.h to make it inlineable. Modified: head/sys/dev/acpica/acpi.c head/sys/dev/acpica/acpivar.h Modified: head/sys/dev/acpica/acpi.c ============================================================================== --- head/sys/dev/acpica/acpi.c Mon Apr 4 18:23:55 2011 (r220337) +++ head/sys/dev/acpica/acpi.c Mon Apr 4 18:39:04 2011 (r220338) @@ -2084,16 +2084,6 @@ acpi_GetHandleInScope(ACPI_HANDLE parent } } -/* 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. */ Modified: head/sys/dev/acpica/acpivar.h ============================================================================== --- head/sys/dev/acpica/acpivar.h Mon Apr 4 18:23:55 2011 (r220337) +++ head/sys/dev/acpica/acpivar.h Mon Apr 4 18:39:04 2011 (r220338) @@ -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 d 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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201104041839.p34Id4Ka092166>