diff options
author | Henrique de Moraes Holschuh <hmh@hmh.eng.br> | 2007-10-08 09:12:56 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2007-10-09 23:53:52 -0400 |
commit | 32afbf07aa53120c0e3fe1881b948ded99f4fc35 (patch) | |
tree | 1d8939e9e890055fd80749c9ef1a79d0fa4288ad /drivers | |
parent | 2369cc9492a462285f9eec9d2bbfa730cc2ab5ac (diff) |
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: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/misc/thinkpad_acpi.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c index 81693b4c23b8..37891a8c030a 100644 --- a/drivers/misc/thinkpad_acpi.c +++ b/drivers/misc/thinkpad_acpi.c | |||
@@ -709,6 +709,8 @@ static int parse_strtoul(const char *buf, | |||
709 | { | 709 | { |
710 | char *endp; | 710 | char *endp; |
711 | 711 | ||
712 | while (*buf && isspace(*buf)) | ||
713 | buf++; | ||
712 | *value = simple_strtoul(buf, &endp, 0); | 714 | *value = simple_strtoul(buf, &endp, 0); |
713 | while (*endp && isspace(*endp)) | 715 | while (*endp && isspace(*endp)) |
714 | endp++; | 716 | endp++; |