EDAC: Replace strict_strtol() with kstrtol()
authorJingoo Han <jg1.han@samsung.com>
Fri, 19 Jul 2013 07:07:21 +0000 (16:07 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 22 Feb 2014 20:41:29 +0000 (12:41 -0800)
commit c542b53da9ffa4fe9de61149818a06aacae531f8 upstream.

The usage of strict_strtol() is not preferred, because strict_strtol()
is obsolete. Thus, kstrtol() should be used.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/edac/edac_mc_sysfs.c

index c4d700a..6022550 100644 (file)
@@ -58,8 +58,10 @@ static int edac_set_poll_msec(const char *val, struct kernel_param *kp)
        if (!val)
                return -EINVAL;
 
-       ret = strict_strtol(val, 0, &l);
-       if (ret == -EINVAL || ((int)l != l))
+       ret = kstrtol(val, 0, &l);
+       if (ret)
+               return ret;
+       if ((int)l != l)
                return -EINVAL;
        *((int *)kp->arg) = l;