Skip to content

Commit

Permalink
ntp: Convert simple_strtol to kstrtol
Browse files Browse the repository at this point in the history
Replace obsolete function simple_strtol w/ kstrtol

Inspired-By: Andrew Morton <akpm@linux-foundation.org>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Fabian Frederick <fabf@skynet.be>
[jstultz: Tweak commit message]
Signed-off-by: John Stultz <john.stultz@linaro.org>
  • Loading branch information
Fabian Frederick authored and John Stultz committed May 12, 2014
1 parent c04ae71 commit cdafb93
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion kernel/time/ntp.c
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,10 @@ void __hardpps(const struct timespec *phase_ts, const struct timespec *raw_ts)

static int __init ntp_tick_adj_setup(char *str)
{
ntp_tick_adj = simple_strtol(str, NULL, 0);
int rc = kstrtol(str, 0, (long *)&ntp_tick_adj);

if (rc)
return rc;
ntp_tick_adj <<= NTP_SCALE_SHIFT;

return 1;
Expand Down

0 comments on commit cdafb93

Please sign in to comment.