Skip to content

Commit

Permalink
ACPI: thinkpad-acpi: skip blanks before the data when parsing sysfs
Browse files Browse the repository at this point in the history
Skip blanks not just at the tail of sysfs writes, but also at the head.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
  • Loading branch information
Henrique de Moraes Holschuh authored and Len Brown committed Oct 10, 2007
1 parent 2369cc9 commit 32afbf0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/misc/thinkpad_acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,8 @@ static int parse_strtoul(const char *buf,
{
char *endp;

while (*buf && isspace(*buf))
buf++;
*value = simple_strtoul(buf, &endp, 0);
while (*endp && isspace(*endp))
endp++;
Expand Down

0 comments on commit 32afbf0

Please sign in to comment.