This commit fixes the "simple_strtoul is obsolete, use kstrtoul instead" checkpatch warning. Signed-off-by: Konrad Zapalowicz <bergo.torino@xxxxxxxxx> --- drivers/platform/x86/thinkpad_acpi.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index 8631981..9456e3f 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c @@ -1067,14 +1067,16 @@ static void delete_attr_set(struct attribute_set *s, struct kobject *kobj) static int parse_strtoul(const char *buf, unsigned long max, unsigned long *value) { - char *endp; + int error = 0; - *value = simple_strtoul(skip_spaces(buf), &endp, 0); - endp = skip_spaces(endp); - if (*endp || *value > max) - return -EINVAL; + error = kstrtoul(skip_spaces(buf), 0, &(*value)); + if (error) + goto out; - return 0; + if (*value > max) + error = -EINVAL; +out: + return error; } static void tpacpi_disable_brightness_delay(void) -- 1.8.1.2 -- To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html