As the timekeeping_init() already initialize the xtime with read_persistent_clock().
Cc: Thomas Gleixner <[email protected]> Cc: John Stultz <[email protected]> Cc: Alessandro Zummo <[email protected]> Cc: Arve Hjønnevåg <[email protected]> Signed-off-by: Feng Tang <[email protected]> --- 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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

