diff options
author | Bob Moore <robert.moore@intel.com> | 2017-09-20 10:00:49 +0800 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2017-10-04 01:43:06 +0200 |
commit | c2e56e54b2b426fdce62e1a08a77ce8e6f4b915c (patch) | |
tree | c8b06d4e7d3dfdc55c9914c192ec6e8d64900da3 /drivers/acpi/acpica/utstrsuppt.c | |
parent | 72a2935502cc0f23567df649ebc644038d24abcf (diff) | |
download | linux-c2e56e54b2b426fdce62e1a08a77ce8e6f4b915c.tar.gz linux-c2e56e54b2b426fdce62e1a08a77ce8e6f4b915c.tar.bz2 linux-c2e56e54b2b426fdce62e1a08a77ce8e6f4b915c.zip |
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.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/utstrsuppt.c b/drivers/acpi/acpica/utstrsuppt.c index 2526ba3b4f12..965fb5cec94f 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 |