|
@@ -165,21 +165,21 @@ static inline void pps_set_freq(s64 freq)
|
|
|
|
|
|
static inline int is_error_status(int status)
|
|
|
{
|
|
|
- return (time_status & (STA_UNSYNC|STA_CLOCKERR))
|
|
|
+ return (status & (STA_UNSYNC|STA_CLOCKERR))
|
|
|
/* PPS signal lost when either PPS time or
|
|
|
* PPS frequency synchronization requested
|
|
|
*/
|
|
|
- || ((time_status & (STA_PPSFREQ|STA_PPSTIME))
|
|
|
- && !(time_status & STA_PPSSIGNAL))
|
|
|
+ || ((status & (STA_PPSFREQ|STA_PPSTIME))
|
|
|
+ && !(status & STA_PPSSIGNAL))
|
|
|
/* PPS jitter exceeded when
|
|
|
* PPS time synchronization requested */
|
|
|
- || ((time_status & (STA_PPSTIME|STA_PPSJITTER))
|
|
|
+ || ((status & (STA_PPSTIME|STA_PPSJITTER))
|
|
|
== (STA_PPSTIME|STA_PPSJITTER))
|
|
|
/* PPS wander exceeded or calibration error when
|
|
|
* PPS frequency synchronization requested
|
|
|
*/
|
|
|
- || ((time_status & STA_PPSFREQ)
|
|
|
- && (time_status & (STA_PPSWANDER|STA_PPSERROR)));
|
|
|
+ || ((status & STA_PPSFREQ)
|
|
|
+ && (status & (STA_PPSWANDER|STA_PPSERROR)));
|
|
|
}
|
|
|
|
|
|
static inline void pps_fill_timex(struct timex *txc)
|
|
@@ -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;
|