ntp: Access tick_length variable via ntp_tick_length()
[deliverable/linux.git] / kernel / time / ntp.c
index f6117a4c7cb8e97eab31019a23122429a800dbf7..f131ba62da623634b8ae9cf3c4960ce2218a7e30 100644 (file)
@@ -28,7 +28,7 @@ unsigned long                 tick_usec = TICK_USEC;
 /* ACTHZ period (nsecs): */
 unsigned long                  tick_nsec;
 
-u64                            tick_length;
+static u64                     tick_length;
 static u64                     tick_length_base;
 
 static struct hrtimer          leap_timer;
@@ -49,7 +49,7 @@ static struct hrtimer         leap_timer;
 static int                     time_state = TIME_OK;
 
 /* clock status bits:                                                  */
-int                            time_status = STA_UNSYNC;
+static int                     time_status = STA_UNSYNC;
 
 /* TAI offset (secs):                                                  */
 static long                    time_tai;
@@ -233,6 +233,17 @@ static inline void pps_fill_timex(struct timex *txc)
 
 #endif /* CONFIG_NTP_PPS */
 
+
+/**
+ * ntp_synced - Returns 1 if the NTP status is not UNSYNC
+ *
+ */
+static inline int ntp_synced(void)
+{
+       return !(time_status & STA_UNSYNC);
+}
+
+
 /*
  * NTP methods:
  */
@@ -349,6 +360,13 @@ void ntp_clear(void)
        pps_clear();
 }
 
+
+u64 ntp_tick_length(void)
+{
+       return tick_length;
+}
+
+
 /*
  * Leap second processing. If in leap-insert state at the end of the
  * day, the system clock is set back one second; if in leap-delete
This page took 0.035793 seconds and 5 git commands to generate.