Commit 32afbf07 authored by Henrique de Moraes Holschuh's avatar Henrique de Moraes Holschuh Committed by Len Brown

ACPI: thinkpad-acpi: skip blanks before the data when parsing sysfs

Skip blanks not just at the tail of sysfs writes, but also at the head.
Signed-off-by: default avatarHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 2369cc94
...@@ -709,6 +709,8 @@ static int parse_strtoul(const char *buf, ...@@ -709,6 +709,8 @@ static int parse_strtoul(const char *buf,
{ {
char *endp; char *endp;
while (*buf && isspace(*buf))
buf++;
*value = simple_strtoul(buf, &endp, 0); *value = simple_strtoul(buf, &endp, 0);
while (*endp && isspace(*endp)) while (*endp && isspace(*endp))
endp++; endp++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment