Messages in this thread Patch in this message | | | From | Feng Tang <> | Subject | [PATCH 3/3] rtc: Skip setting xtime if persisent clock exist | Date | Thu, 13 Dec 2012 10:05:28 +0800 |
| |
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/
| |