提交 32afbf07 编写于 作者: H Henrique de Moraes Holschuh 提交者: 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: NHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: NLen Brown <len.brown@intel.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册