]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - kernel/time.c
Merge branch 'fixes-2.6.24' of master.kernel.org:/pub/scm/linux/kernel/git/galak...
[karo-tx-linux.git] / kernel / time.c
index e325597f5bf53fbe000605cd74b8c3ec5f94976e..1afcc78dc3b1d9a3da6439497d2d69e65bc05913 100644 (file)
@@ -57,17 +57,10 @@ EXPORT_SYMBOL(sys_tz);
  */
 asmlinkage long sys_time(time_t __user * tloc)
 {
-       /*
-        * We read xtime.tv_sec atomically - it's updated
-        * atomically by update_wall_time(), so no need to
-        * even read-lock the xtime seqlock:
-        */
-       time_t i = xtime.tv_sec;
-
-       smp_rmb(); /* sys_time() results are coherent */
+       time_t i = get_seconds();
 
        if (tloc) {
-               if (put_user(i, tloc))
+               if (put_user(i,tloc))
                        i = -EFAULT;
        }
        return i;
@@ -218,22 +211,6 @@ asmlinkage long sys_adjtimex(struct timex __user *txc_p)
        return copy_to_user(txc_p, &txc, sizeof(struct timex)) ? -EFAULT : ret;
 }
 
-inline struct timespec current_kernel_time(void)
-{
-        struct timespec now;
-        unsigned long seq;
-
-       do {
-               seq = read_seqbegin(&xtime_lock);
-               
-               now = xtime;
-       } while (read_seqretry(&xtime_lock, seq));
-
-       return now; 
-}
-
-EXPORT_SYMBOL(current_kernel_time);
-
 /**
  * current_fs_time - Return FS time
  * @sb: Superblock.