diff options
Diffstat (limited to 'drivers/platform/x86/thinkpad_acpi.c')
| -rw-r--r-- | drivers/platform/x86/thinkpad_acpi.c | 7 | 
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index 0ed84806f8a..cf61d6a8ef6 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c @@ -1006,11 +1006,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++; +	*value = simple_strtoul(skip_spaces(buf), &endp, 0); +	endp = skip_spaces(endp);  	if (*endp || *value > max)  		return -EINVAL;  |