From: Henrique de Moraes Holschuh <hmh@xxxxxxxxxx> Skip blanks not just at the tail of sysfs writes, but also at the head. Signed-off-by: Henrique de Moraes Holschuh <hmh@xxxxxxxxxx> Signed-off-by: Len Brown <len.brown@xxxxxxxxx> --- 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 81693b4..37891a8 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++; -- 1.5.3.4.206.g58ba4 - To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html