From 32afbf07aa53120c0e3fe1881b948ded99f4fc35 Mon Sep 17 00:00:00 2001 From: Henrique de Moraes Holschuh Date: Mon, 8 Oct 2007 10:12:56 -0300 Subject: 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 Signed-off-by: Len Brown --- drivers/misc/thinkpad_acpi.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/misc/thinkpad_acpi.c') 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++; -- cgit v1.2.2