summaryrefslogtreecommitdiff
path: root/drivers/acpi/acpica/acmacros.h
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2012-12-31 00:05:17 (GMT)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-01-10 11:36:19 (GMT)
commit04a81dce13c672757637b759039de216ed29a536 (patch)
tree06ce2b5dceb2f1b9cea0e480bb1676810c8f889e /drivers/acpi/acpica/acmacros.h
parent528a412c86e7a831d0fd157cac65749b45b64e06 (diff)
downloadlinux-04a81dce13c672757637b759039de216ed29a536.tar.xz
ACPICA: Eliminate some small unnecessary pathname functions.
Removed several small pathname functions to increase efficiency. Essentially, they replace a function call with a single compare. 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 'drivers/acpi/acpica/acmacros.h')
-rw-r--r--drivers/acpi/acpica/acmacros.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/acmacros.h b/drivers/acpi/acpica/acmacros.h
index 3ba11d2..edfcbc8 100644
--- a/drivers/acpi/acpica/acmacros.h
+++ b/drivers/acpi/acpica/acmacros.h
@@ -311,6 +311,12 @@
#define ACPI_EXTRACT_3BIT_FLAG(field, position) (ACPI_GET_3BIT_FLAG ((field) >> position))
#define ACPI_EXTRACT_4BIT_FLAG(field, position) (ACPI_GET_4BIT_FLAG ((field) >> position))
+/* ACPI Pathname helpers */
+
+#define ACPI_IS_ROOT_PREFIX(c) ((c) == (u8) 0x5C) /* Backslash */
+#define ACPI_IS_PARENT_PREFIX(c) ((c) == (u8) 0x5E) /* Carat */
+#define ACPI_IS_PATH_SEPARATOR(c) ((c) == (u8) 0x2E) /* Period (dot) */
+
/*
* An object of type struct acpi_namespace_node can appear in some contexts
* where a pointer to an object of type union acpi_operand_object can also