From mboxrd@z Thu Jan 1 00:00:00 1970 From: Len Brown Subject: [PATCH 34/37] ACPI: thinkpad-acpi: skip blanks before the data when parsing sysfs Date: Wed, 10 Oct 2007 01:06:41 -0400 Message-ID: <1191992804-14965-35-git-send-email-lenb@kernel.org> References: <1191992804-14965-1-git-send-email-lenb@kernel.org> Return-path: Received: from mga10.intel.com ([192.55.52.92]:7214 "EHLO fmsmga102.fm.intel.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751279AbXJJFHN (ORCPT ); Wed, 10 Oct 2007 01:07:13 -0400 In-Reply-To: <1191992804-14965-1-git-send-email-lenb@kernel.org> Message-Id: <32afbf07aa53120c0e3fe1881b948ded99f4fc35.1191992584.git.len.brown@intel.com> In-Reply-To: References: Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: linux-acpi@vger.kernel.org Cc: Henrique de Moraes Holschuh , Len Brown From: Henrique de Moraes Holschuh 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 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