diff options
author | John Stultz <john.stultz@linaro.org> | 2011-11-14 16:06:21 -0500 |
---|---|---|
committer | John Stultz <john.stultz@linaro.org> | 2012-01-26 22:44:20 -0500 |
commit | 8357929e6ae3661d5a3a7378a717f29873ea18c6 (patch) | |
tree | 49cee3ead7619a7a7a8ae2dd01c4a8b1f9e8add9 | |
parent | 70471f2f061d59375e959b4e7d47ee62121babb1 (diff) |
ntp: Cleanup timex.h
Move ntp_sycned to ntp.c and mark time_status as static.
Also yank function declaration for non-existant function.
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Eric Dumazet <eric.dumazet@gmail.com>
CC: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
-rw-r--r-- | include/linux/timex.h | 15 | ||||
-rw-r--r-- | kernel/time/ntp.c | 13 |
2 files changed, 12 insertions, 16 deletions
diff --git a/include/linux/timex.h b/include/linux/timex.h index aa60fe7b6ed6..92e01fc31ca6 100644 --- a/include/linux/timex.h +++ b/include/linux/timex.h | |||
@@ -234,23 +234,9 @@ struct timex { | |||
234 | extern unsigned long tick_usec; /* USER_HZ period (usec) */ | 234 | extern unsigned long tick_usec; /* USER_HZ period (usec) */ |
235 | extern unsigned long tick_nsec; /* ACTHZ period (nsec) */ | 235 | extern unsigned long tick_nsec; /* ACTHZ period (nsec) */ |
236 | 236 | ||
237 | /* | ||
238 | * phase-lock loop variables | ||
239 | */ | ||
240 | extern int time_status; /* clock synchronization status bits */ | ||
241 | |||
242 | extern void ntp_init(void); | 237 | extern void ntp_init(void); |
243 | extern void ntp_clear(void); | 238 | extern void ntp_clear(void); |
244 | 239 | ||
245 | /** | ||
246 | * ntp_synced - Returns 1 if the NTP status is not UNSYNC | ||
247 | * | ||
248 | */ | ||
249 | static inline int ntp_synced(void) | ||
250 | { | ||
251 | return !(time_status & STA_UNSYNC); | ||
252 | } | ||
253 | |||
254 | /* Required to safely shift negative values */ | 240 | /* Required to safely shift negative values */ |
255 | #define shift_right(x, s) ({ \ | 241 | #define shift_right(x, s) ({ \ |
256 | __typeof__(x) __x = (x); \ | 242 | __typeof__(x) __x = (x); \ |
@@ -267,7 +253,6 @@ static inline int ntp_synced(void) | |||
267 | extern u64 tick_length; | 253 | extern u64 tick_length; |
268 | 254 | ||
269 | extern void second_overflow(void); | 255 | extern void second_overflow(void); |
270 | extern void update_ntp_one_tick(void); | ||
271 | extern int do_adjtimex(struct timex *); | 256 | extern int do_adjtimex(struct timex *); |
272 | extern void hardpps(const struct timespec *, const struct timespec *); | 257 | extern void hardpps(const struct timespec *, const struct timespec *); |
273 | 258 | ||
diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c index f6117a4c7cb8..ae7e13607d91 100644 --- a/kernel/time/ntp.c +++ b/kernel/time/ntp.c | |||
@@ -49,7 +49,7 @@ static struct hrtimer leap_timer; | |||
49 | static int time_state = TIME_OK; | 49 | static int time_state = TIME_OK; |
50 | 50 | ||
51 | /* clock status bits: */ | 51 | /* clock status bits: */ |
52 | int time_status = STA_UNSYNC; | 52 | static int time_status = STA_UNSYNC; |
53 | 53 | ||
54 | /* TAI offset (secs): */ | 54 | /* TAI offset (secs): */ |
55 | static long time_tai; | 55 | static long time_tai; |
@@ -233,6 +233,17 @@ static inline void pps_fill_timex(struct timex *txc) | |||
233 | 233 | ||
234 | #endif /* CONFIG_NTP_PPS */ | 234 | #endif /* CONFIG_NTP_PPS */ |
235 | 235 | ||
236 | |||
237 | /** | ||
238 | * ntp_synced - Returns 1 if the NTP status is not UNSYNC | ||
239 | * | ||
240 | */ | ||
241 | static inline int ntp_synced(void) | ||
242 | { | ||
243 | return !(time_status & STA_UNSYNC); | ||
244 | } | ||
245 | |||
246 | |||
236 | /* | 247 | /* |
237 | * NTP methods: | 248 | * NTP methods: |
238 | */ | 249 | */ |