summaryrefslogtreecommitdiff
path: root/drivers/misc
diff options
context:
space:
mode:
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>2007-10-08 10:12:56 -0300
committerLen Brown <len.brown@intel.com>2007-10-09 23:53:52 -0400
commit32afbf07aa53120c0e3fe1881b948ded99f4fc35 (patch)
tree1d8939e9e890055fd80749c9ef1a79d0fa4288ad /drivers/misc
parent2369cc9492a462285f9eec9d2bbfa730cc2ab5ac (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/misc')
-rw-r--r--drivers/misc/thinkpad_acpi.c2
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,
{
char *endp;
+ while (*buf && isspace(*buf))
+ buf++;
*value = simple_strtoul(buf, &endp, 0);
while (*endp && isspace(*endp))
endp++;