[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1355364328-19550-3-git-send-email-feng.tang@intel.com>
Date: Thu, 13 Dec 2012 10:05:28 +0800
From: Feng Tang <feng.tang@...el.com>
To: John Stultz <john.stultz@...aro.org>,
Thomas Gleixner <tglx@...utronix.de>,
Alessandro Zummo <a.zummo@...ertech.it>,
linux-kernel@...r.kernel.org
Cc: alek.du@...el.com, Feng Tang <feng.tang@...el.com>,
Arve Hjønnevåg <arve@...roid.com>
Subject: [PATCH 3/3] rtc: Skip setting xtime if persisent clock exist
As the timekeeping_init() already initialize the xtime with
read_persistent_clock().
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: John Stultz <john.stultz@...aro.org>
Cc: Alessandro Zummo <a.zummo@...ertech.it>
Cc: Arve Hjønnevåg <arve@...roid.com>
Signed-off-by: Feng Tang <feng.tang@...el.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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists