tree-wide: convert open calls to remove spaces to skip_spaces() lib function
[sfrench/cifs-2.6.git] / drivers / platform / x86 / thinkpad_acpi.c
index 0ed84806f8ae26e24d48d334694c88ee2a465254..cf61d6a8ef6f6410f8a684410fc1f03a9669d0fe 100644 (file)
@@ -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;