mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Feng Tang <feng.tang@intel.com>
To: John Stultz <john.stultz@linaro.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Alessandro Zummo <a.zummo@towertech.it>,
	linux-kernel@vger.kernel.org
Cc: alek.du@intel.com, "Feng Tang" <feng.tang@intel.com>,
	"Arve Hjønnevåg" <arve@android.com>
Subject: [PATCH 3/3] rtc: Skip setting xtime if persisent clock exist
Date: Thu, 13 Dec 2012 10:05:28 +0800	[thread overview]
Message-ID: <1355364328-19550-3-git-send-email-feng.tang@intel.com> (raw)
In-Reply-To: <1355364328-19550-1-git-send-email-feng.tang@intel.com>

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


  parent reply	other threads:[~2012-12-13  2:05 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-13  2:05 [PATCH 1/3] timekeeping: Add persistent_clock_exist flag Feng Tang
2012-12-13  2:05 ` [PATCH 2/3] rtc: Skip the suspend/resume handling if persistent clock exist Feng Tang
2012-12-13  2:05 ` Feng Tang [this message]
2012-12-14  1:20 ` [PATCH 1/3] timekeeping: Add persistent_clock_exist flag John Stultz
2012-12-14  1:37   ` Feng Tang
2012-12-14  2:00     ` John Stultz
2012-12-14  2:15       ` Feng Tang
2012-12-14  2:38       ` Jason Gunthorpe
2012-12-14  3:13         ` Feng Tang
2012-12-14  4:10           ` Jason Gunthorpe
2012-12-14 21:22             ` John Stultz
2012-12-14 21:56               ` Jason Gunthorpe
2012-12-14 23:23                 ` John Stultz
2012-12-17 16:14                 ` Feng Tang
2012-12-17 18:22                   ` Jason Gunthorpe
2012-12-18  2:44                     ` Feng Tang
2012-12-14 21:36         ` John Stultz
2012-12-20  7:02         ` Feng Tang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1355364328-19550-3-git-send-email-feng.tang@intel.com \
    --to=feng.tang@intel.com \
    --cc=a.zummo@towertech.it \
    --cc=alek.du@intel.com \
    --cc=arve@android.com \
    --cc=john.stultz@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®