summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/utstrsuppt.c
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2017-09-20 10:00:49 +0800
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-10-04 01:43:06 +0200
commitc2e56e54b2b426fdce62e1a08a77ce8e6f4b915c (patch)
treec8b06d4e7d3dfdc55c9914c192ec6e8d64900da3 /drivers/acpi/acpica/utstrsuppt.c
parent72a2935502cc0f23567df649ebc644038d24abcf (diff)
downloadop-kernel-dev-c2e56e54b2b426fdce62e1a08a77ce8e6f4b915c.zip
op-kernel-dev-c2e56e54b2b426fdce62e1a08a77ce8e6f4b915c.tar.gz
ACPICA: String conversions: Update to add new behaviors
ACPICA commit e3574138af82a25d76324559848689946982dbd0 1) Allow whitespace in string before the constant 2) ut_strtoul64 now always creates a 64-bit integer; iASL will truncate this to the lower 32-bits if the table being compiled is a 32-bit table (DSDT revision less than 2). Link: https://github.com/acpica/acpica/commit/e3574138af82 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/utstrsuppt.c')
-rw-r--r--drivers/acpi/acpica/utstrsuppt.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/utstrsuppt.c b/drivers/acpi/acpica/utstrsuppt.c
index 2526ba3..965fb5c 100644
--- a/drivers/acpi/acpica/utstrsuppt.c
+++ b/drivers/acpi/acpica/utstrsuppt.c
@@ -231,6 +231,31 @@ char acpi_ut_remove_leading_zeros(char **string)
/*******************************************************************************
*
+ * FUNCTION: acpi_ut_remove_whitespace
+ *
+ * PARAMETERS: string - Pointer to input ASCII string
+ *
+ * RETURN: Next character after any whitespace. This character may be
+ * used by the caller to detect end-of-string.
+ *
+ * DESCRIPTION: Remove any leading whitespace in the input string. Return the
+ * next character after the final ASCII zero to enable the caller
+ * to check for the end of the string (NULL terminator).
+ *
+ ******************************************************************************/
+
+char acpi_ut_remove_whitespace(char **string)
+{
+
+ while (isspace((u8)**string)) {
+ *string += 1;
+ }
+
+ return (**string);
+}
+
+/*******************************************************************************
+ *
* FUNCTION: acpi_ut_detect_hex_prefix
*
* PARAMETERS: string - Pointer to input ASCII string
OpenPOWER on IntegriCloud