Skip to content

Commit

Permalink
EDAC: Replace strict_strtol() with kstrtol()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jingoo Han authored and Borislav Petkov committed Jul 24, 2013
1 parent 3b2f64d commit c542b53
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/edac/edac_mc_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit c542b53

Please sign in to comment.