lkml.org 
[lkml]   [2012]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 3/3] rtc: Skip setting xtime if persisent clock exist
Date
As the timekeeping_init() already initialize the xtime with
read_persistent_clock().

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Feng Tang <feng.tang@intel.com>
---
drivers/rtc/hctosys.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/drivers/rtc/hctosys.c b/drivers/rtc/hctosys.c
index 4aa60d7..2b539cd 100644
--- a/drivers/rtc/hctosys.c
+++ b/drivers/rtc/hctosys.c
@@ -52,6 +52,10 @@ static int __init rtc_hctosys(void)
goto err_invalid;
}

+ /* Skip setting xtime again if persistent clock exist */
+ if (persistent_clock_exist)
+ goto skip_timeset;
+
rtc_tm_to_time(&tm, &tv.tv_sec);

err = do_settimeofday(&tv);
@@ -65,6 +69,7 @@ static int __init rtc_hctosys(void)

err_invalid:
err_read:
+skip_timeset:
rtc_class_close(rtc);

err_open:
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2012-12-13 04:21    [W:0.119 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site