From: Henrique de Moraes Holschuh Date: Mon, 8 Oct 2007 13:12:56 +0000 (-0300) Subject: ACPI: thinkpad-acpi: skip blanks before the data when parsing sysfs X-Git-Tag: v2.6.24-rc1~135^2~8^2 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=32afbf07aa53120c0e3fe1881b948ded99f4fc35;p=pandora-kernel.git 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 --- 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++;