summaryrefslogtreecommitdiffstats
path: root/include/acpi
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2013-10-29 09:29:57 +0800
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-10-31 14:35:33 +0100
commitbb1cab3d52375b5007645ca55d2b55167e5f757b (patch)
treefa325a582fcda8db5a0455e98890b4b1e317f313 /include/acpi
parent839e928f5bbb695c31ddc23cf3fae3cf1c9e9f20 (diff)
downloadop-kernel-dev-bb1cab3d52375b5007645ca55d2b55167e5f757b.zip
op-kernel-dev-bb1cab3d52375b5007645ca55d2b55167e5f757b.tar.gz
ACPICA: Clarify ACPI_FREE_BUFFER usage.
Add a comment to clarify reason for using ACPI_FREE_BUFFER directly instead of ACPI_FREE. In addition to that, change one instance in which ACPI_FREE_BUFFER() should be used instead of ACPI_FREE(). [rjw: Subject and changelog] Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/acpi')
-rw-r--r--include/acpi/actypes.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h
index 63909d9..0bb23e6 100644
--- a/include/acpi/actypes.h
+++ b/include/acpi/actypes.h
@@ -919,9 +919,13 @@ struct acpi_buffer {
void *pointer; /* pointer to buffer */
};
-/* Free a buffer created in an struct acpi_buffer via ACPI_ALLOCATE_LOCAL_BUFFER */
-
-#define ACPI_FREE_BUFFER(b) ACPI_FREE(b.pointer)
+/*
+ * Free a buffer created in an struct acpi_buffer via ACPI_ALLOCATE_BUFFER.
+ * Note: We use acpi_os_free here because acpi_os_allocate was used to allocate
+ * the buffer. This purposefully bypasses the internal allocation tracking
+ * mechanism (if it is enabled).
+ */
+#define ACPI_FREE_BUFFER(b) acpi_os_free((b).pointer)
/*
* name_type for acpi_get_name
OpenPOWER on IntegriCloud